Fix lint error in OS.ts

pull/1/head
Scott Nonnenberg 7 years ago
parent 53a471b2b1
commit 925e02e397

@ -5,12 +5,11 @@ import semver from 'semver';
export const isMacOS = () => process.platform === 'darwin';
export const isLinux = () => process.platform === 'linux';
export const isWindows = (minVersion?: string) => {
if (process.platform !== 'win32') return false;
const osRelease = os.release();
const isVersionValid = is.undefined(minVersion)
? true
: semver.gte(osRelease, minVersion);
return isVersionValid;
if (process.platform !== 'win32') {
return false;
}
return is.undefined(minVersion) ? true : semver.gte(osRelease, minVersion);
};

Loading…
Cancel
Save