You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-24 23:26:50 +02:00
Desktop, Cli: Fixed issue when getting version info
This commit is contained in:
@ -62,7 +62,7 @@ const gunzipFile = function(source, destination) {
|
||||
});
|
||||
};
|
||||
|
||||
function shimInit(sharp = null, keytar = null, React = null) {
|
||||
function shimInit(sharp = null, keytar = null, React = null, appVersion = null) {
|
||||
keytar = (shim.isWindows() || shim.isMac()) && !shim.isPortable() ? keytar : null;
|
||||
|
||||
shim.fsDriver = () => {
|
||||
@ -513,12 +513,10 @@ function shimInit(sharp = null, keytar = null, React = null) {
|
||||
shim.waitForFrame = () => {};
|
||||
|
||||
shim.appVersion = () => {
|
||||
if (shim.isElectron()) {
|
||||
const p = require('../packageInfo.js');
|
||||
return p.version;
|
||||
}
|
||||
const p = require('../package.json');
|
||||
return p.version;
|
||||
if (appVersion) return appVersion();
|
||||
// Should not happen but don't throw an error because version number is
|
||||
// used in error messages.
|
||||
return 'unknown-version!';
|
||||
};
|
||||
|
||||
shim.pathRelativeToCwd = (path) => {
|
||||
|
Reference in New Issue
Block a user