allow docker start script to work with podman

This commit is contained in:
Michael Kreuzer 2024-09-11 11:07:06 +02:00
parent e15f13646c
commit ef4f4d8374

View File

@ -37,15 +37,17 @@ export type CliCommandOptions = CliCommandOptions_common & {
export async function command(params: { cliCommandOptions: CliCommandOptions }) { export async function command(params: { cliCommandOptions: CliCommandOptions }) {
exit_if_docker_not_installed: { exit_if_docker_not_installed: {
let commandOutput: Buffer | undefined = undefined; let commandOutput: string | undefined = undefined;
try { try {
commandOutput = child_process.execSync("docker --version", { commandOutput = child_process
stdio: ["ignore", "pipe", "ignore"] .execSync("docker --version", {
}); stdio: ["ignore", "pipe", "ignore"]
})
?.toString("utf8");
} catch {} } catch {}
if (commandOutput?.toString("utf8").includes("Docker")) { if (commandOutput?.includes("Docker") || commandOutput?.includes("podman")) {
break exit_if_docker_not_installed; break exit_if_docker_not_installed;
} }