Skip to content

Commit

Permalink
Fix unset unsafe USER usage on Windows
Browse files Browse the repository at this point in the history
Windows Bash does not set USER, at least inside Github actions.
  • Loading branch information
Rycieos committed Feb 7, 2021
1 parent dc11eb4 commit 461f0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liquidprompt
Expand Up @@ -1155,7 +1155,7 @@ _lp_user() {
if (( EUID == 0 )); then
# user is root
return 2
elif [[ "${USER}" != "$(logname 2>/dev/null || printf '%s' "${LOGNAME-}")" ]]; then
elif [[ "${USER-}" != "$(logname 2>/dev/null || printf '%s' "${LOGNAME-}")" ]]; then
# user is not login user
return 1
else
Expand Down

0 comments on commit 461f0ee

Please sign in to comment.