Skip to content

Commit 14a753f

Browse files
committed
Check if the alientype is valid before trying to call it. This provides a less aggressive error output
1 parent c5f1b6a commit 14a753f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/Alien

+5
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ fi
3636
alientype="${prog%%:*}"
3737
alienpkg="${prog#*:}"
3838
shift 2
39+
if [[ ! -x /System/Index/bin/Alien-$alientype ]]
40+
then
41+
echo "Error: $alientype is not a valid alientype"
42+
exit 1
43+
fi
3944
exec Alien-$alientype $mode $alienpkg "$@"

0 commit comments

Comments
 (0)