1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 11:03:54 +02:00

installer: fix unused variable

(cherry picked from commit 3d3c219d91)
Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
Domen Kožar 2020-05-26 16:23:03 +02:00
parent f117c54318
commit e15dc6783a
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -545,7 +545,7 @@ create_directories() {
}
place_channel_configuration() {
if [ -z "$NIX_INSTALLER_NO_CHANNEL_ADD" ]; then
if [ -z "${NIX_INSTALLER_NO_CHANNEL_ADD:-}" ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > "$SCRATCH/.nix-channels"
_sudo "to set up the default system channel (part 1)" \
install -m 0664 "$SCRATCH/.nix-channels" "$ROOT_HOME/.nix-channels"
@ -731,7 +731,7 @@ setup_default_profile() {
export NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
fi
if [ -z "$NIX_INSTALLER_NO_CHANNEL_ADD" ]; then
if [ -z "${NIX_INSTALLER_NO_CHANNEL_ADD:-}" ]; then
# Have to explicitly pass NIX_SSL_CERT_FILE as part of the sudo call,
# otherwise it will be lost in environments where sudo doesn't pass
# all the environment variables by default.