Skip to content

Commit

Permalink
pm3: textual and --list with no device, exit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed May 17, 2020
1 parent bc767f1 commit be1659b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pm3
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ done
if [ "$1" == "--list" ]; then
shift
if [ "$1" != "" ]; then
echo "Option --list must be used alone"
echo "[!!] Option --list must be used alone"
exit 1
fi
SHOWLIST=true
Expand All @@ -352,7 +352,7 @@ if [ "$1" == "-n" ]; then
N=$1
shift
else
echo "Option -n requires a number between 1 and 9, got \"$1\""
echo "[!!] Option -n requires a number between 1 and 9, got \"$1\""
exit 1
fi
fi
Expand All @@ -363,7 +363,7 @@ if [ "$HOSTOS" = "LINUX" ]; then
# Test presence of wmic
wmic.exe computersystem get name >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "[!] Cannot run wmic.exe, are you sure your WSL is authorized to run Windows processes? (cf WSL interop flag)"
echo "[!!] Cannot run wmic.exe, are you sure your WSL is authorized to run Windows processes? (cf WSL interop flag)"
exit 1
fi
GETPM3LIST=get_pm3_list_WSL
Expand All @@ -384,7 +384,7 @@ if $SHOWLIST; then
$GETPM3LIST 9
if [ ${#PM3LIST} -lt 1 ]; then
echo "[!!] No port found"
exit 0
exit 1
fi
n=1
for DEV in ${PM3LIST[@]}
Expand Down

0 comments on commit be1659b

Please sign in to comment.