From de954827df846483d98747f5e07e9cc88abead92 Mon Sep 17 00:00:00 2001 From: Yannis Mitsos Date: Wed, 24 Oct 2018 21:16:15 +0300 Subject: [PATCH] Support FreeBSD in terminal (#896) --- ReactNativeClient/lib/shim.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ReactNativeClient/lib/shim.js b/ReactNativeClient/lib/shim.js index c0006934a..d5416ec92 100644 --- a/ReactNativeClient/lib/shim.js +++ b/ReactNativeClient/lib/shim.js @@ -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 }; \ No newline at end of file +module.exports = { shim };