Skip to content

Commit 5e7b0bc

Browse files
committed
fix: ensure .claude.json is created as file, not directory
- Add check to remove .claude.json if it exists as directory - This fixes issue where .claude.json was incorrectly created as directory - Now properly creates it as a JSON file with empty object {}
1 parent 0d5e7a9 commit 5e7b0bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.coder/template.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ resource "null_resource" "host_directories" {
7272
mkdir -p "$BASE_DIR/gitconfig"
7373
7474
# Create .claude.json if it doesn't exist
75+
# Remove if it exists as a directory (bug fix)
76+
if [ -d "$BASE_DIR/claude/.claude.json" ]; then
77+
rm -rf "$BASE_DIR/claude/.claude.json"
78+
echo "⚠️ Removed .claude.json directory (was incorrectly created as directory)"
79+
fi
7580
if [ ! -f "$BASE_DIR/claude/.claude.json" ]; then
7681
echo '{}' > "$BASE_DIR/claude/.claude.json"
7782
echo "✅ Created empty .claude.json file"

0 commit comments

Comments
 (0)