mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix getopts error handling ...
This commit is contained in:
parent
1ab3a79d39
commit
3e1c9ebaf7
1 changed files with 2 additions and 2 deletions
|
@ -102,9 +102,9 @@ ynh_handle_getopts_args() {
|
||||||
getopts ":$getopts_parameters" parameter || true
|
getopts ":$getopts_parameters" parameter || true
|
||||||
|
|
||||||
if [ "$parameter" = "?" ]; then
|
if [ "$parameter" = "?" ]; then
|
||||||
ynh_die "Invalid argument: -${OPTARG:-}"
|
ynh_die "Invalid argument: ${1:-}"
|
||||||
elif [ "$parameter" = ":" ]; then
|
elif [ "$parameter" = ":" ]; then
|
||||||
ynh_die "-$OPTARG parameter requires an argument."
|
ynh_die "${1:-} parameter requires an argument."
|
||||||
else
|
else
|
||||||
local shift_value=1
|
local shift_value=1
|
||||||
# Use the long option, corresponding to the short option read by getopts, as a variable
|
# Use the long option, corresponding to the short option read by getopts, as a variable
|
||||||
|
|
Loading…
Add table
Reference in a new issue