Update cmd to get git remote url for backwards compatibility

with older git-2.6.x
This commit is contained in:
Ratnadeep Debnath 2016-11-21 20:46:47 +05:30
parent eb719f85c2
commit ba9995c17b

View File

@ -85,7 +85,7 @@ func hasGitBinary() bool {
// getGitRemote gets git remote URI for the current git repo // getGitRemote gets git remote URI for the current git repo
func getGitRemote(composeFileDir string, remote string) (string, error) { func getGitRemote(composeFileDir string, remote string) (string, error) {
cmd := exec.Command("git", "remote", "get-url", remote) cmd := exec.Command("git", "ls-remote", "--get-url", remote)
cmd.Dir = composeFileDir cmd.Dir = composeFileDir
out, err := cmd.Output() out, err := cmd.Output()
if err != nil { if err != nil {