Unverified Commit f1d1c46b authored by Andrew Matthews's avatar Andrew Matthews Committed by GitHub

Fix example extraction when branch name contains slash (#37140)

* convert slashes to dashes for accurate filename

* Apply suggestions from code review
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 81850eb2
......@@ -78,7 +78,7 @@ export function downloadAndExtractRepo(
),
tar.extract(
{ cwd: root, strip: filePath ? filePath.split('/').length + 1 : 1 },
[`${name}-${branch}${filePath ? `/${filePath}` : ''}`]
[`${name}-${branch.replace(/\//g, '-')}${filePath ? `/${filePath}` : ''}`]
)
)
}
......
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