mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix: harden small runtime and installer edge cases (#100258)
* fix(media): preserve dollar sequences in transcript echoes Co-authored-by: uditDewan <udit.dewan21@gmail.com> * fix(mcp): catch rejected gateway event handlers Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com> * fix(auto-reply): support punctuated silent token prefixes Co-authored-by: simon-w <weng.qimeng@xydigit.com> * fix(discord): keep voice log previews UTF-16 safe Co-authored-by: sunlit-deng <yang.jiajun1@xydigit.com> * fix(clawrouter): bound usage response reads Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com> * fix(browser): bound CDP JSON response reads Co-authored-by: hailory <hailory@xydigit.com> * fix(status): include current time in session status Co-authored-by: connermo <conner.mo@gmail.com> * fix(installer): require Arch detection before pacman Co-authored-by: Iliya Abolghasemi <gfaerny@gmail.com> * fix(apps): default TLS gateway deep links to port 443 Co-authored-by: ben.li <li.yang6@xydigit.com> * fix(infra): keep Undici terminated exceptions nonfatal Co-authored-by: harjoth <harjoth.khara@gmail.com> * fix(auto-reply): avoid Unicode-unsafe token spread --------- Co-authored-by: uditDewan <udit.dewan21@gmail.com> Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com> Co-authored-by: simon-w <weng.qimeng@xydigit.com> Co-authored-by: sunlit-deng <yang.jiajun1@xydigit.com> Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com> Co-authored-by: hailory <hailory@xydigit.com> Co-authored-by: connermo <conner.mo@gmail.com> Co-authored-by: Iliya Abolghasemi <gfaerny@gmail.com> Co-authored-by: ben.li <li.yang6@xydigit.com> Co-authored-by: harjoth <harjoth.khara@gmail.com>
This commit is contained in:
committed by
GitHub
parent
43fd44a28c
commit
deac98eb72
@@ -194,6 +194,58 @@ NODE
|
||||
expect(result.stdout).not.toContain("Installing Node.js via NodeSource");
|
||||
});
|
||||
|
||||
it("ignores an unrelated pacman command on Debian", () => {
|
||||
const result = runInstallShell(`
|
||||
set -euo pipefail
|
||||
source "${SCRIPT_PATH}"
|
||||
OS=linux
|
||||
require_sudo() { :; }
|
||||
install_build_tools_linux() { return 0; }
|
||||
is_root() { return 0; }
|
||||
is_arch_linux() { return 1; }
|
||||
is_alpine_linux() { return 1; }
|
||||
pacman() { printf 'pacman:%s\\n' "$*"; }
|
||||
apt-get() { :; }
|
||||
ui_info() { printf 'info:%s\\n' "$*"; }
|
||||
ui_success() { :; }
|
||||
run_required_step() { printf 'step:%s|%s\\n' "$1" "\${*:2}"; }
|
||||
finish_linux_node_install() { printf 'finish-linux-node\\n'; }
|
||||
install_node
|
||||
`);
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout).toContain("info:Installing Node.js via NodeSource");
|
||||
expect(result.stdout).toContain("step:Installing Node.js|apt_get_install nodejs");
|
||||
expect(result.stdout).toContain("finish-linux-node");
|
||||
expect(result.stdout).not.toContain("pacman:");
|
||||
});
|
||||
|
||||
it("uses pacman for Node.js on Arch Linux", () => {
|
||||
const result = runInstallShell(`
|
||||
set -euo pipefail
|
||||
source "${SCRIPT_PATH}"
|
||||
OS=linux
|
||||
require_sudo() { :; }
|
||||
install_build_tools_linux() { return 0; }
|
||||
is_root() { return 0; }
|
||||
is_arch_linux() { return 0; }
|
||||
pacman() { :; }
|
||||
ui_info() { printf 'info:%s\\n' "$*"; }
|
||||
ui_success() { :; }
|
||||
run_required_step() { printf 'step:%s|%s\\n' "$1" "\${*:2}"; }
|
||||
finish_linux_node_install() { printf 'finish-linux-node\\n'; }
|
||||
install_node
|
||||
`);
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout).toContain(
|
||||
"info:Installing Node.js via pacman (Arch-based distribution detected)",
|
||||
);
|
||||
expect(result.stdout).toContain("step:Installing Node.js|pacman -Sy --noconfirm nodejs npm");
|
||||
expect(result.stdout).toContain("finish-linux-node");
|
||||
expect(result.stdout).not.toContain("Installing Node.js via NodeSource");
|
||||
});
|
||||
|
||||
it("tries nodejs-current when Alpine nodejs is below the runtime floor", () => {
|
||||
const result = runInstallShell(`
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user