|
|
@ -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)) ||
|
|
|
|