mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 06:22:43 +00:00
Set default in parameter expasion to avoid do-rebase exit due an unset var
The script has set -u so calling do-rebase --help fails with the following: $ ./do-rebase --help ./do-rebase: line 16: $1: unbound variable Avoid this by setting a default value when doing the parameter expansion for the positional parameter $1 passed to the usage() function. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
0e98773e00
commit
9fefeed59c
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ alias formatpatch="othergit format-patch $format_patch_ops"
|
|||
usage()
|
||||
{
|
||||
retcode=0
|
||||
if [ -n "$1" ]; then
|
||||
if [ -n "${1:-}" ]; then
|
||||
exec 1>&2
|
||||
retcode=$1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue