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
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

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