@atlashub/smartstack-cli 4.64.0 → 4.65.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 +28 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127485,7 +127485,15 @@ function getContainerEngineStatus() {
|
|
|
127485
127485
|
try {
|
|
127486
127486
|
const podmanCmd = resolvePodmanCmd();
|
|
127487
127487
|
const podmanVer = (0, import_child_process8.execSync)(`${podmanCmd} --version`, { encoding: "utf-8", timeout: 5e3, stdio: "pipe" }).trim();
|
|
127488
|
-
|
|
127488
|
+
const podmanRunning = (() => {
|
|
127489
|
+
try {
|
|
127490
|
+
(0, import_child_process8.execSync)(`${podmanCmd} info`, { encoding: "utf-8", timeout: 1e4, stdio: "pipe" });
|
|
127491
|
+
return true;
|
|
127492
|
+
} catch {
|
|
127493
|
+
return false;
|
|
127494
|
+
}
|
|
127495
|
+
})();
|
|
127496
|
+
return { name: "Podman", version: podmanVer.replace("podman version ", ""), running: podmanRunning };
|
|
127489
127497
|
} catch {
|
|
127490
127498
|
}
|
|
127491
127499
|
return null;
|
|
@@ -127652,18 +127660,12 @@ var doctorCommand = new Command("doctor").description("Run diagnostics and check
|
|
|
127652
127660
|
message: `${containerEngine.name} ${containerEngine.version}`
|
|
127653
127661
|
});
|
|
127654
127662
|
} else if (containerEngine && !containerEngine.running) {
|
|
127663
|
+
const isPodman = containerEngine.name === "Podman";
|
|
127655
127664
|
diagnostics.push({
|
|
127656
127665
|
name: "Container Engine",
|
|
127657
127666
|
status: "warning",
|
|
127658
|
-
message: `${containerEngine.name} installed but daemon not running`,
|
|
127659
|
-
fix: "Start Docker Desktop, or
|
|
127660
|
-
installCmd: getInstallCmd(pm, {
|
|
127661
|
-
winget: "winget install -e --id RedHat.Podman",
|
|
127662
|
-
brew: "brew install podman",
|
|
127663
|
-
apt: "sudo apt install -y podman",
|
|
127664
|
-
dnf: "sudo dnf install -y podman",
|
|
127665
|
-
pacman: "sudo pacman -S --noconfirm podman"
|
|
127666
|
-
})
|
|
127667
|
+
message: `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
|
|
127668
|
+
fix: isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start"
|
|
127667
127669
|
});
|
|
127668
127670
|
} else {
|
|
127669
127671
|
diagnostics.push({
|
|
@@ -130174,9 +130176,6 @@ function checkEngine(name) {
|
|
|
130174
130176
|
if (version2.status !== 0) {
|
|
130175
130177
|
return { name, installed: false, running: false, cmd };
|
|
130176
130178
|
}
|
|
130177
|
-
if (name === "podman") {
|
|
130178
|
-
return { name, installed: true, running: true, cmd };
|
|
130179
|
-
}
|
|
130180
130179
|
const info = (0, import_child_process12.spawnSync)(cmd, ["info"], {
|
|
130181
130180
|
encoding: "utf-8",
|
|
130182
130181
|
shell: true,
|
|
@@ -130196,11 +130195,24 @@ function detectEngine() {
|
|
|
130196
130195
|
logger.info(`Using ${source_default.cyan("Podman")} (Docker not found or not running)`);
|
|
130197
130196
|
return podman;
|
|
130198
130197
|
}
|
|
130198
|
+
if (podman.installed && !podman.running) {
|
|
130199
|
+
logger.error("Podman is installed but the machine is not running.");
|
|
130200
|
+
console.log();
|
|
130201
|
+
console.log(` Initialize and start the Podman machine:`);
|
|
130202
|
+
console.log(` ${source_default.cyan("podman machine init")} (first time only)`);
|
|
130203
|
+
console.log(` ${source_default.cyan("podman machine start")}`);
|
|
130204
|
+
if (docker.installed) {
|
|
130205
|
+
console.log();
|
|
130206
|
+
console.log(` Or start Docker Desktop instead.`);
|
|
130207
|
+
}
|
|
130208
|
+
console.log();
|
|
130209
|
+
return null;
|
|
130210
|
+
}
|
|
130199
130211
|
if (docker.installed && !docker.running) {
|
|
130200
|
-
logger.error("Docker is installed but the daemon is not running
|
|
130212
|
+
logger.error("Docker is installed but the daemon is not running.");
|
|
130201
130213
|
console.log();
|
|
130202
|
-
console.log(`
|
|
130203
|
-
console.log(`
|
|
130214
|
+
console.log(` Start Docker Desktop and wait for it to be ready.`);
|
|
130215
|
+
console.log(` Or install Podman: ${source_default.cyan("https://podman.io/docs/installation")}`);
|
|
130204
130216
|
console.log();
|
|
130205
130217
|
return null;
|
|
130206
130218
|
}
|