From 63f8e69afca353b5f76e827c0d44df36b556c28a Mon Sep 17 00:00:00 2001 From: Valerie Wolfe Date: Mon, 17 Jun 2024 08:58:42 -0400 Subject: [PATCH] scripts: elevate now only requires a target for DOS mode (Linux mode opens WSL shell) --- scripts/elevate.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/elevate.sh b/scripts/elevate.sh index ad4faa0..780c9d7 100755 --- a/scripts/elevate.sh +++ b/scripts/elevate.sh @@ -13,12 +13,11 @@ if [[ "$1" == "-l" ]]; then elif [[ "$1" == "-w" ]]; then mode='dos' shift -fi - -# error if no target -if [ "$#" -eq 0 ]; then - echo "elevate: no target" - exit 3 + # error if no target for DOS + if [ "$#" -eq 0 ]; then + echo "elevate: DOS mode requires a target" + exit 3 + fi fi # consume target based on mode