fix(install.ps1): camoufox-cli 用 .cmd shim 替代 npm install -g + plugins list stderr - #457
Merged
bigbrother666sh merged 1 commit intoJul 22, 2026
Conversation
…s list stderr 两个 Win 实测卡点: 1. camoufox-cli 全局装 EEXIST:npm install -g $fork 在 Windows 上把 fork 装进 $prefix\node_modules 时撞 fork 源目录本身(EEXIST: file already exists $Root\camoufox-cli)——Windows npm 不能像 Linux 那样 symlink 到源目录。 改仿 openclaw.cmd 写 $Root\bin\camoufox-cli.cmd shim 直接跑 node $fork\dist\cli.js(fork 的 node_modules 已就位,Node 从 cli.js 向上 解析依赖;camoufox-cli JS 用 __dirname 定位包根,行为与全局装一致)。 前置 $Root\bin 进 PATH 让 camoufox-cli install 找得到 shim。 2. plugins list stderr:(& $ClawCmd plugins list 2>$null | Out-String) 在 Windows PowerShell 5.1 + Stop 下压不住 .cmd 的 stderr 仍抛 NativeCommandError。 加 Capture-Streamed helper(Continue + 2>&1 + Out-String)替换。
|
codes-factory-of-bg seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
bigbrother666sh
deleted the
fix/win-camoufox-shim-and-plugins-list-stderr
branch
July 22, 2026 14:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
两个 Win 实测卡点(v5.6.0,Administrator 用户):
1. camoufox-cli 全局装 EEXIST
根因:
npm install -g $fork在 Windows 上把 fork 装进$prefix\node_modules时撞 fork 源目录本身。Windows npm 不能像 Linux/mac 那样 symlink 到源目录(EEXIST on the fork dir)。修法:仿
openclaw.cmd写$Root\bin\camoufox-cli.cmdshim 直接跑node $fork\dist\cli.js(fork 的 node_modules 已就位,Node 从 cli.js 向上解析依赖;camoufox-cli JS 用 __dirname 定位包根,行为与全局装一致)。前置$Root\bin进 PATH 让后续camoufox-cli install找得到 shim。去掉npm_config_prefix和npm install -g。2. plugins list stderr NativeCommandError
根因:
2>$null在 Windows PowerShell 5.1 +Stop下压不住.cmd的 stderr,仍抛 NativeCommandError([[34-win-install-ps1-stderr-stop-gotcha]] 同类坑)。修法:加
Capture-Streamedhelper(临时Continue+2>&1+Out-String)替换。验证
install.ps1 走 raw URL 拉取(
irm raw.githubusercontent.com/.../master/scripts/install.ps1 | iex),合 master 即生效,无需重建 tarball。Auto Release 已禁用,合此 PR 不 bump 版本,保持 v5.6.0。