mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Fix lint error in OS.ts
This commit is contained in:
11
ts/OS.ts
11
ts/OS.ts
@@ -5,12 +5,11 @@ import semver from 'semver';
|
|||||||
export const isMacOS = () => process.platform === 'darwin';
|
export const isMacOS = () => process.platform === 'darwin';
|
||||||
export const isLinux = () => process.platform === 'linux';
|
export const isLinux = () => process.platform === 'linux';
|
||||||
export const isWindows = (minVersion?: string) => {
|
export const isWindows = (minVersion?: string) => {
|
||||||
if (process.platform !== 'win32') return false;
|
|
||||||
|
|
||||||
const osRelease = os.release();
|
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);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user