mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-04-23 08:48:35 +08:00
fix: 修复构建脚本中的进程执行问题
- 移除平台特定的 pnpm 命令路径检测逻辑 - 统一使用 'pnpm' 命令执行 - 启用 shell 模式以正确处理命令执行 - 确保子进程继承正确的标准输入输出流
This commit is contained in:
@@ -4,7 +4,7 @@ const pnpmCommand =
|
||||
process.env.npm_execpath &&
|
||||
process.env.npm_execpath.endsWith('.cjs')
|
||||
? [process.execPath, process.env.npm_execpath]
|
||||
: [process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'];
|
||||
: ['pnpm'];
|
||||
|
||||
const steps = [
|
||||
['exec', 'tsdown', '--no-dts'],
|
||||
@@ -23,7 +23,7 @@ const steps = [
|
||||
for (const args of steps) {
|
||||
const [command, ...commandArgs] = pnpmCommand;
|
||||
const result = spawnSync(command, [...commandArgs, ...args], {
|
||||
shell: false,
|
||||
shell: true,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user