1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

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.
This commit is contained in:
Jose Esteve
2020-09-06 15:20:38 +01:00
committed by GitHub
parent e108fdb1d8
commit 652748f969

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;