remove unnecessary code

pull/4876/head
hyperz111 1 month ago
parent 81e67ea9db
commit 132ca6bb40

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

Loading…
Cancel
Save