Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use isMac functionality from podman desktop API instead. #881

Open
cdrage opened this issue Oct 2, 2024 · 0 comments
Open

Use isMac functionality from podman desktop API instead. #881

cdrage opened this issue Oct 2, 2024 · 0 comments
Labels
kind/enhancement ✨ Issue for requesting an improvement

Comments

@cdrage
Copy link
Contributor

cdrage commented Oct 2, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement ✨ Issue for requesting an improvement
Projects
None yet
Development

No branches or pull requests

1 participant