Add rbenv --debug <command> as a shortcut for setting RBENV_DEBUG=1

This commit is contained in:
Sam Stephenson 2013-01-23 19:06:08 -06:00
parent 892aea138e
commit 3cb95b4d2d

View file

@ -1,11 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
if [ "$1" = "--debug" ]; then
export RBENV_DEBUG=1
shift
fi
if [ -n "$RBENV_DEBUG" ]; then if [ -n "$RBENV_DEBUG" ]; then
export PS4='+ [${BASH_SOURCE##*/}:${LINENO}] ' export PS4='+ [${BASH_SOURCE##*/}:${LINENO}] '
set -x set -x
fi fi
resolve_link() { resolve_link() {
$(type -p greadlink readlink | head -1) "$1" $(type -p greadlink readlink | head -1) "$1"
} }