/bin/garn: line 2: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
Closed this issue · 5 comments
Hello,
I'm trying garn on macOS, I'm seeing this warning every time I run garn command
$HOME/.nix-profile/bin/garn: line 2: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
This is the result of running locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Does this happen for garn build
and garn check
as well as garn enter
? And do you see the logs the same number of times?
Does this happen for
garn build
andgarn check
as well asgarn enter
? And do you see the logs the same number of times?
Yes, it happens with all commands.
executing head -n 5 $HOME/.nix-profile/bin/garn
gives this result:
#! /nix/store/zzpm4317hn2y29rm46krsasaww9wxb1k-bash-5.2-p15/bin/bash -e
export LC_ALL='C.UTF-8'
PATH=${PATH:+':'$PATH':'}
PATH=${PATH/':''/nix/store/553wiycn7i2xbfykssl97smg1pwlgfg0-cabal2json/bin'':'/':'}
PATH='/nix/store/553wiycn7i2xbfykssl97smg1pwlgfg0-cabal2json/bin'$PATH
It looks like this environment variable was changed from LANG
to LC_ALL
in ae69820. LANG
was originally introduced in 3e52fd0.
I've removed the variables completely in 665f623, but haven't opened a PR yet since I'm not sure of the ramifications. In my limited testing though I am still able to nix profile install
garn and everything seems to work well both inside and outside of the garn repo -- the environment variable isn't set on my system. LANG
is set, but calling garn with LANG='' garn
also seems to have no noticeable impact on it. Can anyone see any reason not to remove these?
Fixed in #422. Will be released in v0.0.17
.