bsdinstall: Fix command line argument list parsing

bsddialog(1) uses getopt_long(3) to parse command line argument list.
Add '--' to avoid errors caused by arguments (menu items) begin
with '-'.
The change is compatible with dialog(1) and Xdialog(1).
This commit is contained in:
Alfonso S. Siciliano 2023-10-11 10:17:04 +02:00
parent 7cff9672de
commit 8df9efe877
No known key found for this signature in database
GPG key ID: 3F9EEFACFD371E37
2 changed files with 2 additions and 2 deletions

View file

@ -195,7 +195,7 @@ while :; do
--default-item \"\$defaultitem\" \
--menu \"\$prompt\" \
$height $width $rows \
$menu_list \
${USE_DIALOG:+--} $menu_list \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
) || {
f_quietly rm -f "$KEYMAPFILE"

View file

@ -396,7 +396,7 @@ dialog_menu_main()
--default-item \"\$defaultitem\" \
--menu \"\$prompt\" \
$height $width $rows \
$menu_list \
${USE_DIALOG:+--} $menu_list \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
)
local retval=$?