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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(info): display correct os name on Windows 11 #4968

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@ionic/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"leek": "0.0.24",
"lodash": "^4.17.5",
"open": "^7.0.4",
"os-name": "^4.0.0",
"os-name": "^5.1.0",
"semver": "^7.1.1",
"split2": "^3.0.0",
"ssh-config": "^1.1.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/@ionic/cli/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export async function generateIonicEnvironment(ctx: IonicContext, pargv: string[
const proxyVars = PROXY_ENVIRONMENT_VARIABLES.map((e): [string, string | undefined] => [e, process.env[e]]).filter(([, v]) => !!v);

const getInfo = async () => {
const osName = await import('os-name');
// use `eval()` to avoid `tsc` convert `import()` to `require()`
// because `os-name` package only support ESM since v5 release
// TODO: remove `eval()` once we upgrade to typescript 4.7+ and set `module: "node16"` in `tsconfig.base.json`
const { default: osName } = await eval("import('os-name')");
const semver = await import('semver');
const { getUpdateConfig } = await import('./updates');

Expand Down