Skip to content

Commit

Permalink
remove more bin bash c
Browse files Browse the repository at this point in the history
  • Loading branch information
medyagh committed Oct 28, 2019
1 parent e2bbf71 commit 29a015b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,17 +1035,18 @@ Suggested workarounds:

// Try an HTTPS connection to the
proxy := os.Getenv("HTTPS_PROXY")
opts := "-sS"
opts := []string{"-sS"}
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)
if repo == "" {
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})
}
return ip
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/command/command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func getDeleteFileCommand(f assets.CopyableFile) string {
// Command returns a human readable command string that does not induce eye fatigue
func (rr RunResult) Command() string {
var sb strings.Builder
sb.WriteString(strings.TrimPrefix(rr.Args[0], "../../"))
sb.WriteString(rr.Args[0])
for _, a := range rr.Args[1:] {
if strings.Contains(a, " ") {
sb.WriteString(fmt.Sprintf(` "%s"`, a))
Expand Down

0 comments on commit 29a015b

Please sign in to comment.