test(installer): source guarded shell rc in wrapper · openclaw/openclaw@808d268
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -202,7 +202,7 @@ describe("install.sh", () => {
|
202 | 202 | ui_info() { :; } |
203 | 203 | activate_supported_node_on_path |
204 | 204 | printf 'first=%s\\n' "$(sed -n '1p' "$HOME/.bashrc")" |
205 | | - HOME=${JSON.stringify(home)} PATH=${JSON.stringify(`${oldBin}:${installedBin}:/usr/bin:/bin`)} bash -lc '. "$HOME/.bashrc"; printf "node=%s\\n" "$(command -v node)"' |
| 205 | + HOME=${JSON.stringify(home)} PATH=${JSON.stringify(`${oldBin}:${installedBin}:/usr/bin:/bin`)} bash -lc 'source_rc() { . "$HOME/.bashrc"; }; source_rc; printf "node=%s\\n" "$(command -v node)"' |
206 | 206 | `); |
207 | 207 | } finally { |
208 | 208 | rmSync(tmp, { force: true, recursive: true }); |
@@ -299,7 +299,7 @@ describe("install.sh", () => {
|
299 | 299 | ui_success() { :; } |
300 | 300 | fix_npm_permissions |
301 | 301 | printf 'first=%s\\n' "$(sed -n '1p' "$HOME/.bashrc")" |
302 | | - HOME=${JSON.stringify(home)} PATH=/usr/bin:/bin bash -lc '. "$HOME/.bashrc"; printf "path=%s\\n" "\${PATH%%:*}"' |
| 302 | + HOME=${JSON.stringify(home)} PATH=/usr/bin:/bin bash -lc 'source_rc() { . "$HOME/.bashrc"; }; source_rc; printf "path=%s\\n" "\${PATH%%:*}"' |
303 | 303 | `); |
304 | 304 | } finally { |
305 | 305 | rmSync(tmp, { force: true, recursive: true }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。