Skip to content

Commit 24c7cba

Browse files
committed
fix: correctly handle not provided system-features
1 parent 554757f commit 24c7cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ SSH
10501050
10511051
# Get system-features with a specific cpu architecture from the machine and add them to the installer
10521052
if [[ -n ${flake} ]]; then
1053-
system_features=$(nix --extra-experimental-features 'nix-command flakes' eval --apply toString "${flake}"#"${flakeAttr}".nix.settings.system-features)
1053+
system_features=$(nix --extra-experimental-features 'nix-command flakes' eval --apply 'x: toString (x.nix.settings.system-features or "")' "${flake}#${flakeAttr}")
10541054
if [[ -z ${system_features} ]]; then
10551055
system_features=$(runSshNoTty -o ConnectTimeout=10 nix --extra-experimental-features 'nix-command' config show system-features)
10561056
fi

0 commit comments

Comments
 (0)