mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
files: improve 'target not in $HOME' check
Check for prefix instead of inclusion.
This commit is contained in:
parent
8759a5a63e
commit
f6900f0689
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ in
|
|||
target="$(realpath -m "$out/$relTarget")"
|
||||
|
||||
# Target path must be within $HOME.
|
||||
if [[ ! $target =~ $out ]] ; then
|
||||
if [[ ! $target == $out* ]] ; then
|
||||
echo "Error installing file '$relTarget' outside \$HOME" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue