Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
🚑 Fix the executor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DuGlaser committed Dec 16, 2020
1 parent 88a2688 commit 987979f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions icurl/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ func Excutor(t string) {
fmt.Println()
fmt.Println()

cmd := exec.Command("curl", arg...)
s := strings.Join(arg, " ")
fmt.Println(s)

cmd := exec.Command("/bin/sh", "-c", "curl "+s)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()
if err := cmd.Run(); err != nil {
fmt.Printf("Got error: %s\n", err.Error())
}
fmt.Println()
fmt.Println()
return
}

0 comments on commit 987979f

Please sign in to comment.