adminforth 2.4.0-next.6 → 2.4.0-next.7

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.
@@ -289,11 +289,15 @@ async function installDependencies(ctx, cwd) {
289
289
 
290
290
  const nodeBinary = process.execPath;
291
291
  const npmPath = path.join(path.dirname(nodeBinary), npmCmd);
292
- console.log("npmPath",`${nodeBinary} ${npmPath} install`);
292
+
293
+ // Quote paths if they contain spaces to handle paths like "C:\Program Files\nodejs\"
294
+ const quotedNodeBinary = nodeBinary.includes(' ') ? `"${nodeBinary}"` : nodeBinary;
295
+ const quotedNpmPath = npmPath.includes(' ') ? `"${npmPath}"` : npmPath;
296
+
293
297
  const customDir = ctx.customDir;
294
298
  const res = await Promise.all([
295
- await execAsync(`${nodeBinary} ${npmPath} install`, { cwd, env: { PATH: process.env.PATH } }),
296
- await execAsync(`${nodeBinary} ${npmPath} install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
299
+ await execAsync(`${quotedNodeBinary} ${quotedNpmPath} install`, { cwd, env: { PATH: process.env.PATH } }),
300
+ await execAsync(`${quotedNodeBinary} ${quotedNpmPath} install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
297
301
  ]);
298
302
  // console.log(chalk.dim(`Dependencies installed in ${cwd} and ${customDir}: \n${res[0].stdout}${res[1].stdout}`));
299
303
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.4.0-next.6",
3
+ "version": "2.4.0-next.7",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",