From 60e63edd61a5b60b01beeabd7ff5bf656e5a595f Mon Sep 17 00:00:00 2001 From: Octoturge Date: Sun, 23 Aug 2026 16:55:56 +0200 Subject: [PATCH] Fix bogus templates/ self-match in delete-detection step git ls-tree -d --name-only \$SHA -- templates matched the templates/ directory entry itself (basename "templates"), so every run tried and harmlessly failed to delete a nonexistent profiles-templates template. Use 'templates/*' as the pathspec to list only the child directories. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/coder-templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/coder-templates.yml b/.gitea/workflows/coder-templates.yml index 5765e37..0ad8f89 100644 --- a/.gitea/workflows/coder-templates.yml +++ b/.gitea/workflows/coder-templates.yml @@ -61,7 +61,7 @@ jobs: exit 0 fi - OLD_DIRS="$(git ls-tree -d --name-only "$PREV_SHA" -- templates 2>/dev/null | xargs -n1 basename 2>/dev/null || true)" + OLD_DIRS="$(git ls-tree -d --name-only "$PREV_SHA" -- 'templates/*' 2>/dev/null | xargs -n1 basename 2>/dev/null || true)" if [ -z "$OLD_DIRS" ]; then echo "No templates/ directory at $PREV_SHA, nothing to diff. Skipping." exit 0