remove more bin bash c
parent
e2bbf7111e
commit
29a015b63f
|
@ -1035,9 +1035,9 @@ Suggested workarounds:
|
||||||
|
|
||||||
// Try an HTTPS connection to the
|
// Try an HTTPS connection to the
|
||||||
proxy := os.Getenv("HTTPS_PROXY")
|
proxy := os.Getenv("HTTPS_PROXY")
|
||||||
opts := "-sS"
|
opts := []string{"-sS"}
|
||||||
if proxy != "" && !strings.HasPrefix(proxy, "localhost") && !strings.HasPrefix(proxy, "127.0") {
|
if proxy != "" && !strings.HasPrefix(proxy, "localhost") && !strings.HasPrefix(proxy, "127.0") {
|
||||||
opts = fmt.Sprintf("-x %s %s", proxy, opts)
|
opts = append([]string{"-x", proxy}, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
repo := viper.GetString(imageRepository)
|
repo := viper.GetString(imageRepository)
|
||||||
|
@ -1045,7 +1045,8 @@ Suggested workarounds:
|
||||||
repo = images.DefaultImageRepo
|
repo = images.DefaultImageRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := r.RunCmd(exec.Command("/bin/bash", "-c", fmt.Sprintf("curl %s https://%s/", opts, repo))); err != nil {
|
opts = append(opts, fmt.Sprintf("https://%s/", repo))
|
||||||
|
if _, err := r.RunCmd(exec.Command("curl", opts...)); err != nil {
|
||||||
out.WarningT("VM is unable to connect to the selected image repository: {{.error}}", out.V{"error": err})
|
out.WarningT("VM is unable to connect to the selected image repository: {{.error}}", out.V{"error": err})
|
||||||
}
|
}
|
||||||
return ip
|
return ip
|
||||||
|
|
|
@ -54,7 +54,7 @@ func getDeleteFileCommand(f assets.CopyableFile) string {
|
||||||
// Command returns a human readable command string that does not induce eye fatigue
|
// Command returns a human readable command string that does not induce eye fatigue
|
||||||
func (rr RunResult) Command() string {
|
func (rr RunResult) Command() string {
|
||||||
var sb strings.Builder
|
var sb strings.Builder
|
||||||
sb.WriteString(strings.TrimPrefix(rr.Args[0], "../../"))
|
sb.WriteString(rr.Args[0])
|
||||||
for _, a := range rr.Args[1:] {
|
for _, a := range rr.Args[1:] {
|
||||||
if strings.Contains(a, " ") {
|
if strings.Contains(a, " ") {
|
||||||
sb.WriteString(fmt.Sprintf(` "%s"`, a))
|
sb.WriteString(fmt.Sprintf(` "%s"`, a))
|
||||||
|
|
Loading…
Reference in New Issue