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 nodeBinary = process.execPath; // Path to the Node.js binary running this script
288
- const npmPath = path.join(path.dirname(nodeBinary), 'npm'); // Path to the npm executable
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(`"${nodeBinary}" "${npmPath}" install`, { cwd, env: { PATH: process.env.PATH } }),
293
- await execAsync(`"${nodeBinary}" "${npmPath}" install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.2.0-next.10",
3
+ "version": "2.2.0-next.11",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",