Use isMac functionality from podman desktop API instead. · Issue #881 · podman-desktop/extension-bootc (original) (raw)
Is your enhancement related to a problem? Please describe
We have this in the code:
const windows = os.platform() === 'win32';
export function isWindows(): boolean {
return windows;
}
const linux = os.platform() === 'linux';
export function isLinux(): boolean {
return linux;
}
const darwin = os.platform() === 'darwin';
export function isMac(): boolean {
return darwin;
}
Describe the solution you'd like
We should replace it with the built-in Podman Desktop functionality here:
import { env } from '@podman-desktop/api'
env.isMac
``
### Describe alternatives you've considered
_No response_
### Additional context
From https://github.com/containers/podman-desktop-extension-bootc/pull/865#discussion_r1784841518