fix(install): awada 插件路径直接解析成绝对路径写回 openclaw.json - #454
Merged
bigbrother666sh merged 1 commit intoJul 21, 2026
Merged
Conversation
macOS 用户 v5.6.0 装完 openclaw 校验 config 报:
missing env var "XIAOBEI_HOME" at plugins.load.paths[0]
plugin path not found: /Users/pinshikeji/${XIAOBEI_HOME}/awada
根因:config-templates/openclaw.json 里 plugins.load.paths=["${XIAOBEI_HOME}/awada"]
靠运行时 env 注入。openclaw 在 CLI 上下文(daemon install / doctor / status / 裸跑 openclaw)
校验 config 用的是当前 shell env,未必有 XIAOBEI_HOME → env ref 不展开 → path not found 误报。
(daemon 自己经 launchd wrapper 在 exec 前 . service-env/ai.openclaw.gateway.env 能拿到,
所以 gateway 实际跑得动;误报来自 CLI 校验。)
修法(用户建议):awada 位置在 install 时已知($WISEFLOW_ROOT/awada),place_config_template
放置/保留 config 后用 node 把 ${XIAOBEI_HOME} 直接替换成绝对路径写回。幂等,更新路线也跑
(修老 config 里残留的 env ref)。AWK_API_KEY 是 secret 保持 ${AWK_API_KEY} env ref 不写死
(写死会落盘明文 + 进 .bak 备份 + doctor 可见)。
另:install_gateway_and_env / refresh_gateway_env_only 写完 env 文件后调 load_env_vars_for_cli
把 AWK_API_KEY + XIAOBEI_HOME 加载进 install shell,让 daemon install / gateway restart /
channels login 这些 CLI 调用校验 config 不再误报 missing env var。不写进用户 shell rc
(secret 不落明文 rc);用户裸跑 openclaw 仍可能 warn,属 env-ref 固有、无实际影响。
install.ps1 Place-Config 同步加路径解析。
|
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. |
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.
macOS 用户 v5.6.0 装完 openclaw 校验 config 报:
根因:config template 里
plugins.load.paths=["${XIAOBEI_HOME}/awada"]靠运行时 env 注入。openclaw 在 CLI 上下文(daemon install / doctor / status / 裸跑 openclaw)校验 config 用的是当前 shell env,未必有 XIAOBEI_HOME → env ref 不展开 → path not found 误报。daemon 自己经 launchd wrapper(exec 前. service-env/ai.openclaw.gateway.env)能拿到,gateway 实际跑得动;误报来自 CLI 校验。修法(用户建议):awada 位置 install 时已知(
$WISEFLOW_ROOT/awada),place_config_template放置/保留 config 后用 node 把${XIAOBEI_HOME}直接替换成绝对路径写回。幂等,更新路线也跑(修老 config 残留 env ref)。AWK_API_KEY 是 secret 保持${AWK_API_KEY}env ref 不写死(写死会落盘明文 + 进 .bak + doctor 可见)。另:
install_gateway_and_env/refresh_gateway_env_only写完 env 文件后调load_env_vars_for_cli把 AWK_API_KEY + XIAOBEI_HOME 加载进 install shell,让 daemon install / gateway restart / channels login 这些 CLI 调用校验 config 不再误报 missing env var。不写进用户 shell rc(secret 不落明文 rc);用户裸跑 openclaw 仍可能 warn,属 env-ref 固有、无实际影响。install.ps1 Place-Config 同步加路径解析。重建 v5.6.0(不 bump patch)。