Skip to content

Commit 38b947b

Browse files
committed
Show usage if run without arguments
Before, running `./miri` without arguments gave './miri: 92: shift: can't shift that many' if run with /bin/sh, or no output at all when run with bash. Although that gives some indication of the error, it's not as helpful as showing the usage.
1 parent 945f007 commit 38b947b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ find_sysroot() {
8989

9090
# Determine command.
9191
COMMAND="$1"
92-
shift
92+
[ $# -gt 0 ] && shift
9393

9494
# Determine flags passed to all cargo invocations.
9595
# This is a bit more annoying that one would hope due to

0 commit comments

Comments
 (0)