Skip to content

Commit

Permalink
Run tr with LC_ALL=C to avoid errors with invalid UTF-8 on Mac
Browse files Browse the repository at this point in the history
With a locale like `en_US.UTF-8`, `tr` complains about invalid UTF-8
when running `cat /dev/urandom | tr ...`.
  • Loading branch information
niklasmohrin committed Nov 11, 2024
1 parent cf24a89 commit 87db339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nix/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
fi
set -x
cp deployment/localsettings.template.py evap/localsettings.py
sed -i -e "s/\$SECRET_KEY/$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)/" evap/localsettings.py
sed -i -e "s/\$SECRET_KEY/$(head /dev/urandom | LC_ALL=C tr -dc A-Za-z0-9 | head -c 32)/" evap/localsettings.py
git submodule update --init
./manage.py migrate --noinput
./manage.py collectstatic --noinput
Expand Down

0 comments on commit 87db339

Please sign in to comment.