Windows 10 install fails with PowerShell 5.1 / Windows 10 使用 PowerShell 5.1 安装失败 #7323
ying-zhang
started this conversation in
General
Replies: 2 comments 1 reply
|
上游问题和修复 PR / Upstream report and proposed fix: |
0 replies
|
虽然你说的对,但是就算在powershell5中把dsh装好了,之后的运行由于powershell5屎山语法,模型调用会不停的try-and-error,最终还是会装powershell7才能流畅执行任务。 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
问题描述
在 Windows 10 上,当 npm 的
script-shell配置为 Windows PowerShell 5.1 时,全局安装 dsh 会失败。环境
复现步骤
安装过程会执行
node-pty@1.2.0-beta.15的以下生命周期脚本:npm 通过
powershell.exe -c执行该脚本,但 Windows PowerShell 5.1 不支持||运算符,因此安装失败。将 npm 的脚本 shell 改为 PowerShell 7 或cmd.exe后,安装可以成功完成。上游问题和修复 PR:
dsh 当前已在
patches/node-pty@1.2.0-beta.15.patch中维护了 node-pty 的运行时补丁。因此,可以考虑升级到包含跨 shell 安装修复的 node-pty 版本,或在当前补丁中加入等效修复。建议在发布流程中增加 Windows 10 安装冒烟测试,并分别使用 Windows PowerShell 5.1、PowerShell 7 和
cmd.exe作为 npm 的脚本 shell。Problem
On Windows 10, installing dsh globally fails when npm's
script-shellis configured to use Windows PowerShell 5.1.Environment
Reproduction
The install reaches
node-pty@1.2.0-beta.15, whose lifecycle script is:npm runs it through
powershell.exe -c, but Windows PowerShell 5.1 does not support the||operator, so the installation fails. The installation succeeds when npm uses PowerShell 7 orcmd.exeas its script shell.Upstream report and proposed fix:
dsh currently carries a node-pty runtime patch in
patches/node-pty@1.2.0-beta.15.patch. It may therefore be useful to either upgrade to a node-pty release containing the cross-shell installation fix or add an equivalent change to the existing patch.Could the release process include a Windows 10 smoke test with npm configured for Windows PowerShell 5.1, PowerShell 7, and
cmd.exe?All reactions