mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
home-manager: check output path
In particular, error out if the output path already exists.
This commit is contained in:
@@ -11,6 +11,11 @@ function doBuild() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -e "$2" ]]; then
|
||||
echo "The output path $2 already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local confFile output
|
||||
confFile="$(realpath "$1")"
|
||||
output="$(realpath "$2")"
|
||||
|
||||
Reference in New Issue
Block a user