diff --git a/src/node/init/init.ts b/src/node/init/init.ts index 7bb8aa83..c2d5f23f 100644 --- a/src/node/init/init.ts +++ b/src/node/init/init.ts @@ -54,10 +54,7 @@ export async function init(root?: string) { const cwd = slash(process.cwd()) const dir = slash(value as string) - const cwdRE = new RegExp( - `^${dir.endsWith('/') ? `${cwd}/` : cwd}`, - 'u' - ) + const cwdRE = new RegExp(`^${cwd}`, 'u') // If give absolute path, use that path instead const absolutePath = (process.platform === 'win32' && /^[A-Z]:/i.test(dir)) ||