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

Deinit submodules before removing the repo

when forcing init/clone to happen.
This commit is contained in:
Erik Flodin
2021-01-03 23:02:25 +01:00
parent fb56513d17
commit accec694f5
2 changed files with 4 additions and 1 deletions

2
yadm
View File

@@ -747,6 +747,7 @@ function clone() {
# remove existing if forcing the clone to happen anyway
[ -d "$YADM_REPO" ] && {
debug "Removing existing repo prior to clone"
"$GIT_PROGRAM" -C "$YADM_WORK" submodule deinit -f --all
rm -rf "$YADM_REPO"
}
@@ -1129,6 +1130,7 @@ function init() {
# remove existing if forcing the init to happen anyway
[ -d "$YADM_REPO" ] && {
debug "Removing existing repo prior to init"
"$GIT_PROGRAM" -C "$YADM_WORK" submodule deinit -f --all
rm -rf "$YADM_REPO"
}