From c4d319268c69f91b80e2d19db648e477086dcd69 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Sat, 2 Jun 2018 13:52:18 +0100 Subject: [PATCH] Disable git terminal prompt This allows requests that want authentication to fail instantly and silently. Rather than delying the program and printing to the terminal. --- download.go | 2 +- vcs.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/download.go b/download.go index d2e86177..6bba35b9 100644 --- a/download.go +++ b/download.go @@ -149,7 +149,7 @@ func getPkgbuilds(pkgs []string) error { } // GetPkgbuild downloads pkgbuild from the ABS. -func getPkgbuildsfromABS(pkgs []string, path string) (missing bool,err error) { +func getPkgbuildsfromABS(pkgs []string, path string) (missing bool, err error) { dbList, err := alpmHandle.SyncDbs() if err != nil { return diff --git a/vcs.go b/vcs.go index 5b219c3c..e64b32cf 100644 --- a/vcs.go +++ b/vcs.go @@ -136,6 +136,7 @@ func getCommit(url string, branch string, protocols []string) string { cmd := exec.Command(config.GitBin, "ls-remote", protocol+"://"+url, branch) cmd.Stdout = &outbuf + cmd.Env = append(cmd.Env, "GIT_TERMINAL_PROMPT=0") err := cmd.Start() if err != nil {