Skip to content

Commit

Permalink
setup-environment-commands: fix LC_ALL warning
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 3, 2023
1 parent d61a9e1 commit 18e2a7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/setup-environment-commands
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,11 @@ if test -z "${LANG-}"; then
LANG='C'
fi
if test -z "${LC_ALL-}"; then
LC_ALL="$LANG"
# fix on ssh into macos: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
# https://stackoverflow.com/questions/49778200/bash-warning-setlocale-lc-all-cannot-change-locale-en-us-utf-8#comment132342818_51361013
if ! command-exists locale || locale -a | grep --quiet --fixed-strings --regexp="$LANG"; then
LC_ALL="$LANG"
fi
fi

# EDITOR, SUDO_EDITOR doesn't do anything so ignore
Expand Down

0 comments on commit 18e2a7b

Please sign in to comment.