1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Only assert private dirs, when worktree = $HOME

This commit is contained in:
Tim Byrne
2019-12-10 08:16:42 -06:00
parent e7d2406af3
commit 18e5fcfacc
3 changed files with 26 additions and 8 deletions

4
yadm
View File

@@ -1564,6 +1564,10 @@ function invoke_hook() {
function assert_private_dirs() {
work=$(unix_path "$("$GIT_PROGRAM" config core.worktree)")
# only assert private dirs if the worktree is the same as $HOME
[ "$work" != "$HOME" ] && return
for private_dir in "$@"; do
if [ ! -d "$work/$private_dir" ]; then
debug "Creating $work/$private_dir"