diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index ec696d838cc..0bf5a2f3c80 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -45,8 +45,7 @@ let copy_bin_and_libs () { [ -f "$out/bin/$(basename $1)" ] && return 0 cp -pdv $1 $out/bin - LDD="$(ldd $1)" - [ "$?" -eq "1" ] && return 0 + LDD="$(ldd $1)" || return 0 LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')" for LIB in $LIBS; do [ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib