Skip to content

Commit e577e7e

Browse files
committed
fixed display sent to stdout instead of stderr
1 parent 681e207 commit e577e7e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

main.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ func main() {
6363
flag.Parse()
6464

6565
if v {
66-
fmt.Printf("splitsh-lite version %s\n", version)
66+
fmt.Fprintf(os.Stderr, "splitsh-lite version %s\n", version)
6767
os.Exit(0)
6868
}
6969

7070
if len(prefixes) == 0 {
71-
fmt.Println("You must provide the directory to split via the --prefix flag")
71+
fmt.Fprintln(os.Stderr, "You must provide the directory to split via the --prefix flag")
7272
os.Exit(1)
7373
}
7474

7575
if legacy {
76-
fmt.Fprintf(os.Stderr, `The --legacy option is deprecated (use --git="<1.8.2" instead)`)
76+
fmt.Fprintln(os.Stderr, `The --legacy option is deprecated (use --git="<1.8.2" instead)`)
7777
gitVersion = "<1.8.2"
7878
}
7979

@@ -100,9 +100,8 @@ func main() {
100100
}()
101101
}
102102

103-
err := splitter.Split(config, result)
104-
if err != nil {
105-
fmt.Println(err)
103+
if err := splitter.Split(config, result); err != nil {
104+
fmt.Fprintln(os.Stderr, err.Error())
106105
os.Exit(1)
107106
}
108107

0 commit comments

Comments
 (0)