From 6938692ca2d57d93819cd22e5a709cb541a61b50 Mon Sep 17 00:00:00 2001 From: Andreas Johansson Date: Fri, 12 Aug 2011 11:33:45 +0200 Subject: [PATCH] Fix argument that cannot be sent to bash via env /usr/bin/env seems to have problems with arguments to bash on some platforms. To bypass this, use set -e instead. --- libexec/rbenv | 3 ++- libexec/rbenv-commands | 3 ++- libexec/rbenv-exec | 3 ++- libexec/rbenv-help | 3 ++- libexec/rbenv-init | 3 ++- libexec/rbenv-prefix | 3 ++- libexec/rbenv-rehash | 6 ++++-- libexec/rbenv-set-default | 3 ++- libexec/rbenv-set-local | 3 ++- libexec/rbenv-version | 3 ++- libexec/rbenv-version-name | 3 ++- libexec/rbenv-version-origin | 3 ++- libexec/rbenv-versions | 3 ++- libexec/rbenv-whence | 3 ++- libexec/rbenv-which | 3 ++- 15 files changed, 32 insertions(+), 16 deletions(-) diff --git a/libexec/rbenv b/libexec/rbenv index 74ab8928..b979ca85 100755 --- a/libexec/rbenv +++ b/libexec/rbenv @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e abs_dirname() { local cwd="$(pwd)" diff --git a/libexec/rbenv-commands b/libexec/rbenv-commands index 49ba268b..43846ce4 100755 --- a/libexec/rbenv-commands +++ b/libexec/rbenv-commands @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e shopt -s nullglob diff --git a/libexec/rbenv-exec b/libexec/rbenv-exec index a538a52f..3e3929d9 100755 --- a/libexec/rbenv-exec +++ b/libexec/rbenv-exec @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e RBENV_COMMAND="$1" if [ -z "$RBENV_COMMAND" ]; then diff --git a/libexec/rbenv-help b/libexec/rbenv-help index 2b1bba08..8820b200 100755 --- a/libexec/rbenv-help +++ b/libexec/rbenv-help @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e print_set_version() { echo " should be a string matching a Ruby version known by rbenv." diff --git a/libexec/rbenv-init b/libexec/rbenv-init index 6b9765f2..d695879b 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e print="" if [ "$1" = "-" ]; then diff --git a/libexec/rbenv-prefix b/libexec/rbenv-prefix index f65701f6..3f22e7ee 100755 --- a/libexec/rbenv-prefix +++ b/libexec/rbenv-prefix @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e if [ -n "$1" ]; then RBENV_VERSION="$1" diff --git a/libexec/rbenv-rehash b/libexec/rbenv-rehash index 6254d0aa..0259fe1b 100755 --- a/libexec/rbenv-rehash +++ b/libexec/rbenv-rehash @@ -1,8 +1,10 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash +set -e create_prototype_shim() { cat > .rbenv-shim <