Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed May 3, 2017
1 parent fc01d8e commit 9f89ff0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions root.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ Homepage: https://github.com/shenwei356/rush
if len(config.Infiles) == 0 {
config.Infiles = append(config.Infiles, "-")
}
if len(config.Infiles) == 1 && isStdin(config.Infiles[0]) && !xopen.IsStdin() {
checkError(fmt.Errorf(`STDIN not detected. type "rush -h" for help`))
}

if config.Version {
checkVersion()
return
}

if len(config.Infiles) == 1 && isStdin(config.Infiles[0]) && !xopen.IsStdin() {
checkError(fmt.Errorf(`STDIN not detected. type "rush -h" for help`))
}

j := config.Jobs + 1
if j > runtime.NumCPU() {
j = runtime.NumCPU()
Expand Down

0 comments on commit 9f89ff0

Please sign in to comment.