From b7aa1f2c80332cad4c6d156726ab56591cf1ee12 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 26 May 2015 17:59:50 -0400 Subject: cmd/installer-pc: Require non-null -a and -p opt args Previously, something like the following would work: # prokit installer-pc -a '' -p '' dev/trunk /dev/sdb --- diff --git a/lib/cmd/installer-pc.sh b/lib/cmd/installer-pc.sh index 7a12e1a..69381d0 100644 --- a/lib/cmd/installer-pc.sh +++ b/lib/cmd/installer-pc.sh @@ -43,11 +43,11 @@ cmd_installer_pc_main() fi shift $(($OPTIND - 1)) - if [ "x${cmd_installer_pc_opt_a+set}" != 'xset' ]; then + if [ "x${cmd_installer_pc_opt_a-}" = 'x' ]; then print_cmd_usage 'installer-pc' >&2 exit 1 fi - if [ "x${cmd_installer_pc_opt_p+set}" != 'xset' ]; then + if [ "x${cmd_installer_pc_opt_p-}" = 'x' ]; then print_cmd_usage 'installer-pc' >&2 exit 1 fi -- cgit v0.9.1