cicy-desktop 2.1.293 → 2.1.294

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.293",
3
+ "version": "2.1.294",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -637,6 +637,9 @@ async function wslMissing() {
637
637
  return await new Promise((resolve) => {
638
638
  execFile(wslExe(), ["--status"], { timeout: 25000, windowsHide: true, encoding: "utf16le" }, (err, stdout, stderr) => {
639
639
  const s = String((stdout || "") + (stderr || "") + (err && err.message ? err.message : ""));
640
+ // wsl.exe 不存在(ENOENT):功能刚启用但还没重启 Windows 时就是这样 —— 按「缺失」处理,
641
+ // 让 ensureWsl 走 needsReboot,而不是当成已就绪去 --import 然后 spawn ENOENT。
642
+ if (err && (err.code === "ENOENT" || /ENOENT/.test(err.message || ""))) return resolve(true);
640
643
  if (/未安装|not installed|--install/i.test(s)) return resolve(true); // definitely missing
641
644
  if (err && (err.killed || err.signal || err.code === "ETIMEDOUT")) return resolve(null); // timed out → unknown
642
645
  resolve(false); // wsl present (errored for another reason → assume OK)
@@ -60,3 +60,7 @@ test("WSL setup is a single elevation with component-store repair fallback; rebo
60
60
  test("auto-update defaults to on", () => {
61
61
  assert.match(read("src/app-updater.js"), /desktopAutoUpdate !== false/);
62
62
  });
63
+
64
+ test("a missing wsl.exe (ENOENT, features enabled but not yet rebooted) counts as WSL missing", () => {
65
+ assert.match(read("src/sidecar/docker.js"), /err\.code === "ENOENT"[^\n]*return resolve\(true\)/);
66
+ });