Skip to content

Commit 7b53191

Browse files
committed
fix(apply): remove empty architecture directory if it only contains .gitkeep
1 parent 2aa7f2a commit 7b53191

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/apply.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,16 @@ function revert-promptfiles() {
377377
fi
378378
done
379379

380+
# Remove docs/architecture directory if empty or only contains .gitkeep
381+
if [[ -d "${dest}/docs/architecture" ]]; then
382+
local arch_contents
383+
arch_contents=$(ls -A "${dest}/docs/architecture" 2>/dev/null)
384+
if [[ -z "${arch_contents}" ]] || [[ "${arch_contents}" == ".gitkeep" ]]; then
385+
print-info "Removing ${dest}/docs/architecture"
386+
rm -rf "${dest:?}/docs/architecture"
387+
fi
388+
fi
389+
380390
# Remove docs/prompts directory
381391
if [[ -d "${dest}/docs/prompts" ]]; then
382392
print-info "Removing ${dest}/docs/prompts"

0 commit comments

Comments
 (0)