Skip to content

Commit 2a88bbd

Browse files
committed
! fix unbound variable: args[@]
1 parent a7c0846 commit 2a88bbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/xpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ while [ $# -gt 0 ]; do
7575
;;
7676
--)
7777
shift
78-
args=("${args[@]}" "$@")
78+
args=(${args[@]:+"${args[@]}"} "$@")
7979
break
8080
;;
8181
-*)
8282
usage 2 "${PROG}: unrecognized option '$1'"
8383
;;
8484
*)
85-
args=("${args[@]}" "$1")
85+
args=(${args[@]:+"${args[@]}"} "$1")
8686
shift
8787
;;
8888
esac

0 commit comments

Comments
 (0)