Skip to content

Commit

Permalink
Fix cmd runner by changing os.Args to flag.Args
Browse files Browse the repository at this point in the history
  • Loading branch information
dvinciguerra authored and pcasaretto committed Apr 26, 2019
1 parent 4ffb1ed commit 51de608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func main() {
log.Fatalf("Error parsing file %s\n\t%s\n", *filename, err)
}

cmd := exec.Command(os.Args[1], os.Args[2:]...)
cmdArgs := flag.Args()
cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...)
stdinPipe, err := cmd.StdinPipe()
if err != nil {
log.Fatalf("Failed opening stdin")
Expand Down

0 comments on commit 51de608

Please sign in to comment.