diff --git a/bin/fresh b/bin/fresh index e577d51..c151d63 100755 --- a/bin/fresh +++ b/bin/fresh @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e FRESH_RCFILE="${FRESH_RCFILE:-$HOME/.freshrc}" FRESH_PATH="${FRESH_PATH:-$HOME/.fresh}" diff --git a/install.sh b/install.sh index 47b566f..c054ab1 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Install fresh with the following command: # diff --git a/spec/fresh_spec.rb b/spec/fresh_spec.rb index ed0834d..8a7a98f 100644 --- a/spec/fresh_spec.rb +++ b/spec/fresh_spec.rb @@ -1426,7 +1426,7 @@ let(:path) do capture(:stdout) do system <<-EOF -/bin/bash -c "$( +/usr/bin/env bash -c "$( cat <<'SH' export PATH=/usr/bin source #{shell_sh_path} @@ -1477,7 +1477,7 @@ path = capture(:stdout) do system <<-EOF -/bin/bash -c "$( +/usr/bin/env bash -c "$( cat <<'SH' export PATH=/usr/bin source #{shell_sh_path} @@ -1498,7 +1498,7 @@ run_fresh out = capture(:stdout) do system <<-EOF -/bin/bash -c "$( +/usr/bin/env bash -c "$( cat <<'SH' source #{shell_sh_path} echo "$__FRESH_BIN_PATH__" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d7c6107..da9184c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -127,7 +127,8 @@ def stub_curl(*args) options.assert_valid_keys :error template = <<-ERB.strip_heredoc - #!/bin/bash -e + #!/usr/bin/env bash + set -e echo curl >> <%= curl_log_path %> diff --git a/spec/support/bin/git b/spec/support/bin/git index 81043b7..b54c453 100755 --- a/spec/support/bin/git +++ b/spec/support/bin/git @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e echo cd "$(pwd)" >> $SANDBOX_PATH/git.log echo git "$@" >> $SANDBOX_PATH/git.log