mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Support FreeBSD in terminal (#896)
This commit is contained in:
parent
2cb24bf198
commit
de954827df
@ -18,6 +18,10 @@ shim.isLinux = () => {
|
||||
return process && process.platform === 'linux';
|
||||
}
|
||||
|
||||
shim.isFreeBSD = () => {
|
||||
return process && process.platform === 'freebsd';
|
||||
}
|
||||
|
||||
shim.isWindows = () => {
|
||||
return process && process.platform === 'win32';
|
||||
}
|
||||
@ -31,6 +35,7 @@ shim.platformName = function() {
|
||||
if (shim.isMac()) return 'darwin';
|
||||
if (shim.isWindows()) return 'win32';
|
||||
if (shim.isLinux()) return 'linux';
|
||||
if (shim.isFreeBSD()) return 'freebsd';
|
||||
throw new Error('Cannot determine platform');
|
||||
}
|
||||
|
||||
@ -145,4 +150,4 @@ shim.Buffer = null;
|
||||
shim.openUrl = () => { throw new Error('Not implemented'); }
|
||||
shim.waitForFrame = () => { throw new Error('Not implemented'); }
|
||||
|
||||
module.exports = { shim };
|
||||
module.exports = { shim };
|
||||
|
Loading…
Reference in New Issue
Block a user