home-manager: check output path
In particular, error out if the output path already exists.
This commit is contained in:
parent
d02f8b17ef
commit
e0a37be515
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,11 @@ function doBuild() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -e "$2" ]]; then
|
||||||
|
echo "The output path $2 already exists."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
local confFile output
|
local confFile output
|
||||||
confFile="$(realpath "$1")"
|
confFile="$(realpath "$1")"
|
||||||
output="$(realpath "$2")"
|
output="$(realpath "$2")"
|
||||||
|
|
Loading…
Reference in a new issue