Skip to content

Commit

Permalink
fix(cli): tune filter for extracting example .tar (#40513)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
balazsorban44 committed Sep 13, 2022
1 parent 3cf7a30 commit a4ff041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-next-app/helpers/examples.ts
Expand Up @@ -122,7 +122,7 @@ export async function downloadAndExtractExample(root: string, name: string) {
file: tempFile,
cwd: root,
strip: 3,
filter: (p) => p.includes(`next.js-canary/examples/${name}`),
filter: (p) => p.includes(`next.js-canary/examples/${name}/`),
})

await fs.unlink(tempFile)
Expand Down

0 comments on commit a4ff041

Please sign in to comment.