Skip to content

Commit 875645c

Browse files
committed
Only ignore manifest.yml at the app root directory
[Finishes #70044992]
1 parent 331861f commit 875645c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/cf/app_files/cf_ignore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type cfIgnore []ignorePattern
7474

7575
var defaultIgnoreLines = []string{
7676
".cfignore",
77-
"manifest.yml",
77+
"/manifest.yml",
7878
".gitignore",
7979
".git",
8080
".hg",

src/cf/app_files/cf_ignore_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,22 @@ stuff/exclude.c`)
5858
ignore = NewCfIgnore(`!.git`)
5959
Expect(ignore.FileShouldBeIgnored(".git/objects")).To(BeFalse())
6060
})
61+
62+
Describe("files named manifest.yml", func() {
63+
var (
64+
ignore CfIgnore
65+
)
66+
67+
BeforeEach(func() {
68+
ignore = NewCfIgnore("")
69+
})
70+
71+
It("ignores manifest.yml at the top level", func() {
72+
Expect(ignore.FileShouldBeIgnored("manifest.yml")).To(BeTrue())
73+
})
74+
75+
It("does not ignore nested manifest.yml files", func() {
76+
Expect(ignore.FileShouldBeIgnored("public/assets/manifest.yml")).To(BeFalse())
77+
})
78+
})
6179
})

0 commit comments

Comments
 (0)