Skip to content

Commit a4ff041

Browse files
fix(cli): tune filter for extracting example .tar (#40513)
As pointed out in #40389 (comment), the `filter` matched more files than necessary and merged different example directories together. This change makes the filter match the example directory name precisely. Fixes #40389 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
1 parent 3cf7a30 commit a4ff041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/create-next-app/helpers/examples.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export async function downloadAndExtractExample(root: string, name: string) {
122122
file: tempFile,
123123
cwd: root,
124124
strip: 3,
125-
filter: (p) => p.includes(`next.js-canary/examples/${name}`),
125+
filter: (p) => p.includes(`next.js-canary/examples/${name}/`),
126126
})
127127

128128
await fs.unlink(tempFile)

0 commit comments

Comments
 (0)