Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func _plugging():
# Source other than github
plug("https://gitlab.com/Xecestel/sound-manager") # Gitlab
plug("file:///D/Godot/local-project/.git") # Local git repo
plug("../local-project/.git") # Local git repo using a relative path (identified by initial ./ or ../)

connect("updated", "_on_plugin_updated")

Expand Down
4 changes: 3 additions & 1 deletion addons/gd-plug/plug.gd
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ func plug(repo, args={}):
plugin.url = ""
if ":" in repo:
plugin.url = repo
elif repo.begins_with("../") or repo.begins_with("./"):
plugin.url = "../../" + repo
elif repo.find("/") == repo.rfind("/"):
plugin.url = DEFAULT_PLUGIN_URL % repo
else:
Expand Down Expand Up @@ -850,7 +852,7 @@ class _GitExecutable extends RefCounted:
command = "git clone --depth=1 --single-branch --branch %s '%s' '%s'" % [branch if branch else tag, src, dest]
elif commit:
return clone_commit(src, dest, commit)
var exit = _execute(command, output)
var exit = _execute(command, output, true)
logger.debug("Successfully cloned from %s" % src if exit == OK else "Failed to clone from %s" % src)
return {"exit": exit, "output": output}

Expand Down