create-bingstack-app 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +7 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -46,6 +46,12 @@ async function main() {
|
|
|
46
46
|
})
|
|
47
47
|
if (p.isCancel(pkgManager)) return cancel()
|
|
48
48
|
|
|
49
|
+
const { failed } = await execa(pkgManager, ['--version'], { reject: false })
|
|
50
|
+
if (failed) {
|
|
51
|
+
p.log.error(`${pkgManager} is not installed. Please install it and try again.`)
|
|
52
|
+
process.exit(1)
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
const targetDir = path.resolve(process.cwd(), projectName)
|
|
50
56
|
|
|
51
57
|
if (existsSync(targetDir)) {
|
|
@@ -85,7 +91,7 @@ async function main() {
|
|
|
85
91
|
{
|
|
86
92
|
const s = p.spinner()
|
|
87
93
|
s.start(`Installing dependencies with ${pkgManager}...`)
|
|
88
|
-
await execa(pkgManager, ['install'], { cwd: targetDir })
|
|
94
|
+
await execa(pkgManager, ['install'], { cwd: targetDir, shell: true })
|
|
89
95
|
s.stop('Dependencies installed')
|
|
90
96
|
}
|
|
91
97
|
|