Commit 5fd4ec64 authored by Sam Stephenson's avatar Sam Stephenson
Browse files

`rbenv install` with no arguments defaults to `rbenv local`

parent 36b2d13b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -66,7 +66,13 @@ for option in "${OPTIONS[@]}"; do
done

unset VERSION_NAME

# The first argument contains the definition to install. If the
# argument is missing, try to install whatever local app-specific
# version is specified by rbenv. Show usage instructions if a local
# version is not specified.
DEFINITION="${ARGUMENTS[0]}"
[ -n "$DEFINITION" ] || DEFINITION="$(rbenv local 2>/dev/null || true)"
[ -n "$DEFINITION" ] || usage 1