oasis_test_v2 2.2.14 → 2.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_base/wrapper-base.sh +20 -0
- package/dist/index.js +7463 -7105
- package/package.json +2 -2
|
@@ -53,6 +53,26 @@ oasis_resolve_bin() {
|
|
|
53
53
|
return 0
|
|
54
54
|
fi
|
|
55
55
|
done <<< "$(echo "$PATH" | tr ':' '\n')"
|
|
56
|
+
|
|
57
|
+
# 最后一档:名为 <cmd>.oasis-displaced 的原件。
|
|
58
|
+
#
|
|
59
|
+
# ⚠ 这一档现在是**善后用的**,不是常态路径。2026-09-11 短暂上线过一版「派单时自动把
|
|
60
|
+
# $HOME/.local/bin/<cmd> 改名挪走」(node-daemon 2.2.15),当天就回退了——挪走会让**已在
|
|
61
|
+
# 跑的会话**里 inject() 解出来的 LARK_BIN/GH_BIN 失效,回落去扫 PATH,而扫 PATH 会选中
|
|
62
|
+
# 同机**另一个** staged wrapper(不同会话/部署根,realpath 不等于 $0 所以跳不过),
|
|
63
|
+
# 两个 wrapper 互相把对方当真 CLI,叠上下面的 --version 自检后指数级 fork
|
|
64
|
+
# (实测 1.1 万进程、load 391)。
|
|
65
|
+
#
|
|
66
|
+
# 那一版可能已经在某些节点上留下了 <cmd>.oasis-displaced。这一档保证那些机器上的真 CLI
|
|
67
|
+
# 还能被找回来,不至于「按 <cmd> 扫 PATH 一个都找不到」。**别删它**,也别据此重新引入自动挪动。
|
|
68
|
+
while IFS= read -r dir; do
|
|
69
|
+
candidate="$dir/$cmd_name.oasis-displaced"
|
|
70
|
+
if [ -x "$candidate" ] && [ "$(realpath "$candidate" 2>/dev/null)" != "$SELF" ]; then
|
|
71
|
+
printf -v "$bin_var" '%s' "$candidate"
|
|
72
|
+
export "$bin_var"
|
|
73
|
+
return 0
|
|
74
|
+
fi
|
|
75
|
+
done <<< "$(echo "$PATH" | tr ':' '\n')"
|
|
56
76
|
}
|
|
57
77
|
|
|
58
78
|
# Check that the resolved binary is accessible and responds to --version.
|