diff --git a/ts/OS.ts b/ts/OS.ts index efc71bf9e..25ee963e2 100644 --- a/ts/OS.ts +++ b/ts/OS.ts @@ -5,11 +5,12 @@ import semver from 'semver'; export const isMacOS = () => process.platform === 'darwin'; export const isLinux = () => process.platform === 'linux'; export const isWindows = (minVersion?: string) => { - const isPlatformValid = process.platform === 'win32'; + if (process.platform !== 'win32') return false; + const osRelease = os.release(); const isVersionValid = is.undefined(minVersion) ? true : semver.gte(osRelease, minVersion); - return isPlatformValid && isVersionValid; + return isVersionValid; };