diff --git a/.config/yadm/autoyadm.sh b/.config/yadm/autoyadm.sh index 418336ea..cedd13ca 100755 --- a/.config/yadm/autoyadm.sh +++ b/.config/yadm/autoyadm.sh @@ -19,10 +19,10 @@ if [ -z "$HOST" ]; then HOST="$(hostname)" fi +yadm config advice.addIgnoredFile false # First we read each path from "tracked" (while read -r path; do # we disable ignored warning for this subshell - yadm config advice.addIgnoredFile false # Execute yadm add on each real file # if the path points to a directory # This ensures symlinks are not added @@ -34,6 +34,7 @@ fi # If neither file nor dir, something is very wrong! else echo "$AYE Target must be a directory or a file!" + yadm config --unset advice.addIgnoredFile exit 1 fi done) <"$HOME/.config/yadm/tracked" @@ -46,6 +47,7 @@ if [[ -n $(yadm status --porcelain) ]]; then if [[ -f "$sshenv" ]]; then if ((!AUTOYADMPUSH)); then echo "$AYM Pushing disabled, aborting..." + yadm config --unset advice.addIgnoredFile exit 1 fi # Directive to suppress shellcheck warning @@ -54,8 +56,10 @@ if [[ -n $(yadm status --porcelain) ]]; then yadm push else echo "$AYE ssh-agent environment not found, aborting push..." + yadm config --unset advice.addIgnoredFile exit 1 fi fi +yadm config --unset advice.addIgnoredFile echo "$AYM Push successful!"