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

Various tweaks to build portable version

This commit is contained in:
Laurent Cozic
2018-05-14 11:08:33 +01:00
parent 23c592b322
commit 359b8d5545
5 changed files with 28 additions and 12 deletions

View File

@@ -50,6 +50,10 @@ shim.isElectron = () => {
return false;
}
shim.isPortable = function() {
return typeof process !== 'undefined' && typeof process.env === 'object' && !!process.env.PORTABLE_EXECUTABLE_DIR;
}
// Node requests can go wrong is so many different ways and with so
// many different error messages... This handler inspects the error
// and decides whether the request can safely be repeated or not.