Skip to content

Commit a9caa09

Browse files
committed
exit 0 for —help
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 7cd95e6 commit a9caa09

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func handleSpecialCliOptions(args []string) {
249249
// --help
250250
if opts.ShowHelp {
251251
argparser.WriteHelp(os.Stdout)
252-
os.Exit(1)
252+
os.Exit(0)
253253
}
254254

255255
// --mode

tests/lineinfile.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Go Lineinfile tests:
99
Exec test:
1010

1111
$ go-replace -h > /dev/null
12-
[1]
1312

1413

1514
Testing lineinfile mode:

tests/main.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Go Replace tests:
99
Usage:
1010

1111
$ go-replace -h > /dev/null
12-
[1]
1312
$ go-replace -V
1413
go-replace version .+ \(.+\) (re)
1514
Copyright \(C\) 20[0-9]{2} webdevops.io (re)

tests/template.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Go Replace tests:
99
Exec test:
1010

1111
$ go-replace -h > /dev/null
12-
[1]
1312

1413

1514
Testing template mode:

0 commit comments

Comments
 (0)