diff options
author | Brian Anderson <banderson@mozilla.com> | 2015-04-22 10:50:33 -0700 |
---|---|---|
committer | Brian Anderson <banderson@mozilla.com> | 2015-04-22 10:51:02 -0700 |
commit | e54d4823d26cdb3f98e5a1b17e1c257cd329aa61 (patch) | |
tree | f97c32a558869fada5c20260bb3cdd1ad0c98403 /test.sh | |
parent | 47fbf56ec1d01b359138664ec7e7634c1013b37d (diff) | |
download | rust-installer-e54d4823d26cdb3f98e5a1b17e1c257cd329aa61.tar.gz |
Also route cd to /dev/null
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -12,8 +12,9 @@ fi abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } S="$(abs_path $(dirname $0))" |