From 7df41e2aca38910c01439b57942582e1efc77ce0 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Wed, 13 Dec 2023 09:19:42 +0100 Subject: [PATCH] fix: edit Podman machine support for MacOS only Fixes #5233 Signed-off-by: Jeff MAURY --- extensions/podman/src/extension.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/podman/src/extension.ts b/extensions/podman/src/extension.ts index 3c27975dd87c2..5503b0cc65013 100644 --- a/extensions/podman/src/extension.ts +++ b/extensions/podman/src/extension.ts @@ -606,7 +606,10 @@ async function registerProviderFor(provider: extensionApi.Provider, machineInfo: delete: async (logger): Promise => { await extensionApi.process.exec(getPodmanCli(), ['machine', 'rm', '-f', machineInfo.name], { logger }); }, - edit: async (context, params, logger, _token): Promise => { + }; + //support edit only on MacOS as Podman WSL is nop and generates errors + if (isMac()) { + lifecycle.edit = async (context, params, logger, _token): Promise => { let effective = false; const args = ['machine', 'set', machineInfo.name]; for (const key of Object.keys(params)) { @@ -636,8 +639,8 @@ async function registerProviderFor(provider: extensionApi.Provider, machineInfo: } } } - }, - }; + }; + } const containerProviderConnection: extensionApi.ContainerProviderConnection = { name: prettyMachineName(machineInfo.name),