mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-15 00:36:44 +00:00
activation-checks: don't fail before showing error message
This commit is contained in:
parent
ed7da178fe
commit
4281f777d7
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ let
|
|||
'';
|
||||
|
||||
nixPath = ''
|
||||
darwinConfig=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin-config>')
|
||||
darwinConfig=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin-config>') || true
|
||||
if ! test -e "$darwinConfig"; then
|
||||
echo "[1;31merror: Changed <darwin-config> but target does not exist, aborting activation[0m" >&2
|
||||
echo "Move you configuration.nix or set NIX_PATH:" >&2
|
||||
|
@ -42,7 +42,7 @@ let
|
|||
exit 2
|
||||
fi
|
||||
|
||||
darwinPath=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin>')
|
||||
darwinPath=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin>') || true
|
||||
if ! test -e "$darwinPath"; then
|
||||
echo "[1;31merror: Changed <darwin> but target does not exist, aborting activation[0m" >&2
|
||||
echo "Add the darwin repo as a channel or set NIX_PATH:" >&2
|
||||
|
@ -56,7 +56,7 @@ let
|
|||
exit 2
|
||||
fi
|
||||
|
||||
nixpkgsPath=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<nixpkgs>')
|
||||
nixpkgsPath=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<nixpkgs>') || true
|
||||
if ! test -e "$nixpkgsPath"; then
|
||||
echo "[1;31merror: Changed <nixpkgs> but target does not exist, aborting activation[0m" >&2
|
||||
echo "Add a nixpkgs channel or set NIX_PATH:" >&2
|
||||
|
|
Loading…
Add table
Reference in a new issue