Browse Source

fix(installer): define `$USER` if not defined

Fixes missing $USER value in ArchLinux sh (bash)
Marc Cornellà 2 years ago
parent
commit
861805b64d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tools/install.sh

+ 3 - 0
tools/install.sh

@@ -51,6 +51,9 @@ CHSH=${CHSH:-yes}
 RUNZSH=${RUNZSH:-yes}
 KEEP_ZSHRC=${KEEP_ZSHRC:-no}
 
+# Sane defaults
+USER=${USER:-$(whoami)}
+
 
 command_exists() {
   command -v "$@" >/dev/null 2>&1