@atlashub/smartstack-cli 4.68.0 → 4.69.0

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/index.js CHANGED
@@ -127663,11 +127663,19 @@ var doctorCommand = new Command("doctor").description("Run diagnostics and check
127663
127663
  });
127664
127664
  } else if (containerEngine && !containerEngine.running) {
127665
127665
  const isPodman = containerEngine.name === "Podman";
127666
+ const wslMissing = isPodman && process.platform === "win32" && (() => {
127667
+ try {
127668
+ return (0, import_child_process8.execSync)("wsl --status", { encoding: "utf-8", timeout: 5e3, stdio: "pipe" }) && false;
127669
+ } catch {
127670
+ return true;
127671
+ }
127672
+ })();
127666
127673
  diagnostics.push({
127667
127674
  name: "Container Engine",
127668
127675
  status: "warning",
127669
- message: `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
127670
- fix: isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start"
127676
+ message: wslMissing ? "Podman installed but WSL2 is missing" : `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
127677
+ fix: wslMissing ? "Run as Admin: wsl --install, restart PC, then: podman machine init && podman machine start" : isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start",
127678
+ installCmd: wslMissing ? process.platform === "win32" ? "wsl --install" : void 0 : void 0
127671
127679
  });
127672
127680
  } else {
127673
127681
  diagnostics.push({
@@ -130198,11 +130206,29 @@ function detectEngine() {
130198
130206
  return podman;
130199
130207
  }
130200
130208
  if (podman.installed && !podman.running) {
130201
- logger.error("Podman is installed but the machine is not running.");
130202
- console.log();
130203
- console.log(` Initialize and start the Podman machine:`);
130204
- console.log(` ${source_default.cyan("podman machine init")} (first time only)`);
130205
- console.log(` ${source_default.cyan("podman machine start")}`);
130209
+ const wslMissing = process.platform === "win32" && (() => {
130210
+ try {
130211
+ const r = (0, import_child_process12.spawnSync)("wsl", ["--status"], { encoding: "utf-8", shell: true, timeout: 5e3, stdio: "pipe" });
130212
+ return r.status !== 0;
130213
+ } catch {
130214
+ return true;
130215
+ }
130216
+ })();
130217
+ if (wslMissing) {
130218
+ logger.error("WSL2 is required by Podman but is not installed.");
130219
+ console.log();
130220
+ console.log(` Install WSL2 first (run as Administrator):`);
130221
+ console.log(` ${source_default.cyan("wsl --install")}`);
130222
+ console.log(` Restart your PC, then:`);
130223
+ console.log(` ${source_default.cyan("podman machine init")}`);
130224
+ console.log(` ${source_default.cyan("podman machine start")}`);
130225
+ } else {
130226
+ logger.error("Podman is installed but the machine is not running.");
130227
+ console.log();
130228
+ console.log(` Initialize and start the Podman machine:`);
130229
+ console.log(` ${source_default.cyan("podman machine init")} (first time only)`);
130230
+ console.log(` ${source_default.cyan("podman machine start")}`);
130231
+ }
130206
130232
  if (docker.installed) {
130207
130233
  console.log();
130208
130234
  console.log(` Or start Docker Desktop instead.`);