podman-desktop / podman-desktop

Podman Desktop is the best free and open source tool to work with Containers and Kubernetes for developers. Get an intuitive and user-friendly interface to effortlessly build, manage, and deploy containers and Kubernetes — all from your desktop.
https://podman-desktop.io
Apache License 2.0
4.96k stars 316 forks source link

Powershell 7 support #9539

Open odockal opened 1 month ago

odockal commented 1 month ago

Bug description

As mentioned in https://github.com/containers/podman-desktop/discussions/7413#discussioncomment-10455532, some powershell versions present on the host system do not support Get-WmiObject anymore. See https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1#notes. We need to check on the powershell version that runs the command in and use right cdmlet: Get-CmiInstance. Powershell v7 does not have get-wmiobject cmdlet at all.

We need to handle this code: https://github.com/containers/podman-desktop/blob/main/extensions/podman/packages/extension/src/podman-install.ts#L648

Operating system

Windows 10/11

Installation Method

Installer from website/GitHub releases

Version

next (development version)

Steps to reproduce

No response

Relevant log output

No response

Additional context

No response

jeffmaury commented 1 week ago

I am not sure to understand: is this about supporting Powershell 7 (which I think is a whole epic as the whole codebase is based on Powershell 5 like CRC) or is it supporting environments where Get-WmiObject is not available ?