fix(cli/init): remove trailing slash from npm scripts

pull/2320/head
Divyansh Singh 2 years ago
parent a3b38d1882
commit 64ecedc73f

@ -157,7 +157,8 @@ export function scaffold({
renderFile(file)
}
const dir = root === './' ? `` : ` ${root.replace(/^\.\//, '')}`
const dir =
root === './' ? `` : ` ${root.replace(/^\.\//, '').replace(/[/\\]$/, '')}`
const pkgPath = path.resolve('package.json')
const userPkg = fs.existsSync(pkgPath)

Loading…
Cancel
Save