adminforth 2.2.0-next.10 → 2.2.0-next.11
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.
|
@@ -284,13 +284,13 @@ async function writeTemplateFiles(dirname, cwd, options) {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
async function installDependencies(ctx, cwd) {
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
|
|
287
|
+
const isWindows = process.platform === 'win32';
|
|
288
|
+
const npmCmd = isWindows ? 'npm.cmd' : 'npm';
|
|
289
|
+
|
|
290
290
|
const customDir = ctx.customDir;
|
|
291
291
|
const res = await Promise.all([
|
|
292
|
-
await execAsync(
|
|
293
|
-
await execAsync(
|
|
292
|
+
await execAsync(`${npmCmd} install`, { cwd, env: { PATH: process.env.PATH } }),
|
|
293
|
+
await execAsync(`${npmCmd} install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
|
|
294
294
|
]);
|
|
295
295
|
// console.log(chalk.dim(`Dependencies installed in ${cwd} and ${customDir}: \n${res[0].stdout}${res[1].stdout}`));
|
|
296
296
|
}
|