Unverified Commit b0d951bc authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix nested example setup with create-next-app (#45390)

Noticed in https://github.com/vercel/next.js/pull/45387 we aren't
properly setting up nested examples due to not stripping to the right
level so this ensures we handle that case properly.
parent 87e0c3d6
...@@ -123,7 +123,7 @@ export async function downloadAndExtractExample(root: string, name: string) { ...@@ -123,7 +123,7 @@ export async function downloadAndExtractExample(root: string, name: string) {
await tar.x({ await tar.x({
file: tempFile, file: tempFile,
cwd: root, cwd: root,
strip: 3, strip: 2 + name.split('/').length,
filter: (p) => p.includes(`next.js-canary/examples/${name}/`), filter: (p) => p.includes(`next.js-canary/examples/${name}/`),
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment