evolclaw 3.1.8 → 3.1.9
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/CHANGELOG.md +6 -0
- package/dist/cli/index.js +9 -1
- package/dist/utils/cross-platform.js +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v3.1.9 (2026-06-04)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **Windows `evolclaw watch web` 启动失败(ENOENT)** — Windows 上全局 bin 是 `evolclaw-web.cmd`,`execFileSync('evolclaw-web')` 不补 `.cmd` 后缀导致 spawn ENOENT。新增 `resolveCommandPath()` 通过 `where`/`which` 解析可执行文件真实绝对路径(不缓存,刚安装的命令会重新探测)再执行;定位失败时给出"重开终端"提示
|
|
8
|
+
|
|
3
9
|
## v3.1.8 (2026-06-04)
|
|
4
10
|
|
|
5
11
|
### Bug Fixes
|
package/dist/cli/index.js
CHANGED
|
@@ -2117,7 +2117,15 @@ async function cmdWatchWeb() {
|
|
|
2117
2117
|
process.exit(1);
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
|
-
|
|
2120
|
+
// 解析可执行文件的真实绝对路径:
|
|
2121
|
+
// - Windows 上 bin 是 evolclaw-web.cmd,execFileSync 不会自动补后缀
|
|
2122
|
+
// - 刚安装的命令可能不在当前进程已缓存的 PATH 里,用 where/which 重新探测
|
|
2123
|
+
const exe = platform.resolveCommandPath('evolclaw-web');
|
|
2124
|
+
if (!exe) {
|
|
2125
|
+
process.stderr.write('❌ 已安装 evolclaw-web 但无法定位可执行文件。\n 请重新打开终端后再次运行,或手动执行: evolclaw-web --home ' + home + '\n');
|
|
2126
|
+
process.exit(1);
|
|
2127
|
+
}
|
|
2128
|
+
execFileSync(exe, ['--home', home], { stdio: 'inherit' });
|
|
2121
2129
|
}
|
|
2122
2130
|
async function cmdRestartMonitor() {
|
|
2123
2131
|
const p = resolvePaths();
|
|
@@ -133,6 +133,29 @@ export function commandExists(cmd) {
|
|
|
133
133
|
_commandExistsCache.set(cmd, exists);
|
|
134
134
|
return exists;
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* 解析命令的真实可执行文件绝对路径。
|
|
138
|
+
* Windows: `where` 返回首个匹配(自动含 .cmd/.exe 后缀),解决 execFileSync 不补后缀的问题。
|
|
139
|
+
* 失败返回 null。不缓存——刚安装的命令需要重新探测。
|
|
140
|
+
*/
|
|
141
|
+
export function resolveCommandPath(cmd) {
|
|
142
|
+
try {
|
|
143
|
+
if (isWindows) {
|
|
144
|
+
const r = spawnSync('where', [cmd], { encoding: 'utf-8', stdio: 'pipe', windowsHide: true });
|
|
145
|
+
if (r.status !== 0 || !r.stdout)
|
|
146
|
+
return null;
|
|
147
|
+
const first = r.stdout.split(/\r?\n/).map(s => s.trim()).filter(Boolean)[0];
|
|
148
|
+
return first || null;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const out = execFileSync('which', [cmd], { encoding: 'utf-8', stdio: 'pipe' }).trim();
|
|
152
|
+
return out || null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
136
159
|
/**
|
|
137
160
|
* Cross-platform live log tailing (replaces tail -f).
|
|
138
161
|
* Returns an abort function.
|
package/package.json
CHANGED