Fix lint error in OS.ts

This commit is contained in:
Scott Nonnenberg 2018-05-23 16:04:39 -07:00
parent 53a471b2b1
commit 925e02e397
1 changed files with 5 additions and 6 deletions

View File

@ -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);
};