Skip to content

Commit ab1bec5

Browse files
committed
argbash-init is able to handle empty string as the only argument
It treats it as if it was given a dash. Fixes: #130)
1 parent ad71534 commit ab1bec5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ChangeLog

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Buxfixes:
55

6+
* `argbash-init` is able to handle empty string as the only argument without being puzzled (#130).
7+
68
New features:
79

810
* Argbash in the container has no longer the terminal output limitation caused by the crlf line ending (#129). Thanks to Felipe Santos (@felipecrs)!.

src/argbash-init.m4

+2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ do_stuff()
215215
}
216216

217217
outfname="$_arg_output"
218+
# we canonicize the empty string input to output filename to the dash
219+
test -n "$outfname" || outfname='-'
218220
test "$outfname" = "-" -a "$_arg_separate" -gt 0 && die "If you want to separate parsing and script body, you have to specify the outname, stdout doesn't work."
219221

220222
if test "$outfname" = '-'

0 commit comments

Comments
 (0)