Cli: Resolves #3711: Fix keytar library being loaded up in FreeBSD. (#3712)

Issue https://github.com/laurent22/joplin/issues/3711

This patch replaces the 'isLinux' check by a more restrictive version
which fixes the false positive in BSD systems. This was causing Joplin
not to load due to the lack of X11 in headless mode.
pull/3716/head
Jose Esteve 2020-09-06 15:20:38 +01:00 committed by GitHub
parent e108fdb1d8
commit 652748f969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ const { shim } = require('lib/shim.js');
let keytar:any;
try {
keytar = shim.isLinux() || shim.isPortable() ? null : require('keytar');
keytar = (shim.isWindows() || shim.isMac()) && !shim.isPortable() ? require('keytar') : null;
} catch (error) {
console.error('Cannot load keytar - keychain support will be disabled', error);
keytar = null;