Skip to content

Commit

Permalink
fix: escape unsupported chars from tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 31, 2022
1 parent fd3e5d4 commit fd04922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function extendConfig (config, configFile: string, cwd: string) {
delete config.extends
for (let extendSource of extendSources) {
if (TIGED_PREFIXES.some(prefix => extendSource.startsWith(prefix))) {
const tmpdir = resolve(os.tmpdir(), 'c12/git', extendSource.replace(/[#]/g, '_'))
const tmpdir = resolve(os.tmpdir(), 'c12/git', extendSource.replace(/[#:@]/g, '_'))
await fsp.rmdir(tmpdir, { recursive: true })
const t = tiged(extendSource, { cache: true })
await t.clone(tmpdir)
Expand Down

0 comments on commit fd04922

Please sign in to comment.