home-manager: handle missing configuration file

Make it look a little nicer than having nix-build emit the error.
This commit is contained in:
Robert Helgesson 2017-01-16 00:14:52 +01:00
parent b1f84ada60
commit 8ce389ce2a
Failed to generate hash of commit

View file

@ -23,6 +23,11 @@ function doBuild() {
exit 1 exit 1
fi fi
if [[ ! -r "$confFile" ]]; then
echo "No such configuration file: $1"
exit 1
fi
output="$(realpath "$2")" output="$(realpath "$2")"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then