Skip to content

Commit d849e96

Browse files
committed
Fix imports whitelist in cursor ignore generated project file
1 parent 9f177a0 commit d849e96

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func AddFlowEntriesToCursorIgnore(targetDir string, loader flowkit.ReaderWriter)
185185
".env",
186186
"",
187187
"# Pay attention to imports directory",
188-
"!imports/**",
188+
"!imports",
189189
}
190190

191191
cursorIgnorePath := filepath.Join(targetDir, ".cursorignore")

internal/util/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestAddFlowEntriesToCursorIgnore_NoDuplicates(t *testing.T) {
6161
content, err := state.ReaderWriter().ReadFile(".cursorignore")
6262
require.NoError(t, err, "Failed to read cursorignore file")
6363

64-
expectedEntries := []string{"# flow", "emulator-account.pkey", ".env", "# Pay attention to imports directory", "!imports/**"}
64+
expectedEntries := []string{"# flow", "emulator-account.pkey", ".env", "# Pay attention to imports directory", "!imports"}
6565
for _, entry := range expectedEntries {
6666
assert.Contains(t, string(content), entry, "Expected cursorignore to contain %s", entry)
6767
}
@@ -114,7 +114,7 @@ func TestAddFlowEntriesToCursorIgnore_WithExistingContent(t *testing.T) {
114114

115115
assert.Contains(t, string(content), existingContent, "Expected existing content to be preserved")
116116

117-
flowEntries := []string{"# flow", "emulator-account.pkey", ".env", "# Pay attention to imports directory", "!imports/**"}
117+
flowEntries := []string{"# flow", "emulator-account.pkey", ".env", "# Pay attention to imports directory", "!imports"}
118118
for _, entry := range flowEntries {
119119
assert.Contains(t, string(content), entry, "Expected cursorignore to contain %s", entry)
120120
}

0 commit comments

Comments
 (0)