diff options
author | Cesar Crusius <cesar.crusius@stanfordalumni.org> | 2015-09-17 08:33:28 -0700 |
---|---|---|
committer | Cesar Crusius <cesar.crusius@stanfordalumni.org> | 2015-09-17 08:37:43 -0700 |
commit | c376ef688e5944fc2133c442beafc4f8247d1ee4 (patch) | |
tree | 7f7e30c10e0f289d8a855536462b8de50fc31288 /test | |
parent | 894858dede9c28d6c35d9f9db0ff9f37e6881a60 (diff) | |
download | rebar-c376ef688e5944fc2133c442beafc4f8247d1ee4.tar.gz |
Fix #544
'whoami' is not POSIX-compliant, but 'id -un' is. This is true
at least since the 1003.1-2001 standard, I don't have a copy of the
previous 1003.2-1992 to verify it is true there too.
This causes problems in recent operating systems where 'whoami' is
not even shipped anymore.
Diffstat (limited to 'test')
-rwxr-xr-x | test/upgrade_project/rel/files/dummy | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/upgrade_project/rel/files/dummy b/test/upgrade_project/rel/files/dummy index 67fb2da..7b2caa1 100755 --- a/test/upgrade_project/rel/files/dummy +++ b/test/upgrade_project/rel/files/dummy @@ -6,9 +6,6 @@ if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then POSIX_SHELL="true" export POSIX_SHELL - # To support 'whoami' add /usr/ucb to path - PATH=/usr/ucb:$PATH - export PATH exec /usr/bin/ksh $0 "$@" fi @@ -24,7 +21,7 @@ RUNNER_ETC_DIR=$RUNNER_BASE_DIR/etc # Note the trailing slash on $PIPE_DIR/ PIPE_DIR=/tmp/$RUNNER_BASE_DIR/ RUNNER_USER= -WHOAMI=$(whoami) +WHOAMI=$(id -un) # Make sure this script is running as the appropriate user if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then |