Skip to content

Commit

Permalink
Escape variable so script does not break on space in username
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Hallén committed Jun 19, 2015
1 parent eea9fca commit ed15d55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/lein-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

export LEIN_VERSION="2.5.2-SNAPSHOT"

if [ `whoami` = "root" ] && [ "$LEIN_ROOT" = "" ]; then
export USR=`whoami`

if [ "$USR" = "root" ] && [ "$LEIN_ROOT" = "" ]; then
echo "WARNING: You're currently running as root; probably by accident."
echo "Press control-C to abort or Enter to continue as root."
echo "Set LEIN_ROOT to disable this warning."
Expand Down

0 comments on commit ed15d55

Please sign in to comment.