Skip to content

Commit a67d3ac

Browse files
committed
consistently print to stderr
1 parent 5943ffa commit a67d3ac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/nixos-remote.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,15 @@ if [[ -n ${flake-} ]]; then
169169
flakeAttr="${BASH_REMATCH[2]}"
170170
fi
171171
if [[ -z ${flakeAttr-} ]]; then
172-
echo "Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri."
173-
echo 'For example, to use the output nixosConfigurations.foo from the flake.nix, append "#foo" to the flake-uri.'
172+
echo "Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri." >&2
173+
echo 'For example, to use the output nixosConfigurations.foo from the flake.nix, append "#foo" to the flake-uri.' >&2
174174
exit 1
175175
fi
176176
disko_script=$(nix_build "${flake}#nixosConfigurations.${flakeAttr}.config.system.build.disko")
177177
nixos_system=$(nix_build "${flake}#nixosConfigurations.${flakeAttr}.config.system.build.toplevel")
178178
elif [[ -n ${disko_script-} ]] && [[ -n ${nixos_system-} ]]; then
179179
if [[ ! -e ${disko_script} ]] || [[ ! -e ${nixos_system} ]]; then
180-
echo "${disko_script} and ${nixos_system} must be existing store-paths"
181-
exit 1
180+
abort "${disko_script} and ${nixos_system} must be existing store-paths"
182181
fi
183182
:
184183
else

0 commit comments

Comments
 (0)