Skip to content

Commit

Permalink
check length
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynn Cyrin committed Aug 24, 2019
1 parent 29ad6ee commit 1095838
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ func main() {
}

func runCmd(args ...string) error {
cmd := exec.Command(args[0], args[1:]...)
var cmd *exec.Cmd
if len(args) > 1 {
cmd = exec.Command(args[0], args[1:]...)
} else {
cmd = exec.Command(args[0])
}

cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
Expand Down

0 comments on commit 1095838

Please sign in to comment.