1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Merge branch 'master' of github.com:laurent22/joplin

This commit is contained in:
Laurent Cozic 2020-01-24 23:18:02 +00:00
commit 710447f879

View File

@ -20,10 +20,14 @@ packageInfo.build = { appId: appId };
let branch; let branch;
let hash; let hash;
try { try {
branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim(); // Use stdio: 'pipe' so that execSync doesn't print error directly to stdout
hash = execSync('git log --pretty="%h" -1').toString().trim(); branch = execSync('git rev-parse --abbrev-ref HEAD', {stdio: 'pipe' }).toString().trim();
hash = execSync('git log --pretty="%h" -1', {stdio: 'pipe' }).toString().trim();
} catch (err) { } catch (err) {
console.warn('Could not get git info', err); // Don't display error object as it's a "fatal" error, but
// not for us, since is it not critical information
// https://github.com/laurent22/joplin/issues/2256
console.info('Warning: Could not get git info (it will not be displayed in About dialog box)');
} }
if (typeof branch !== 'undefined' && typeof hash !== 'undefined') { if (typeof branch !== 'undefined' && typeof hash !== 'undefined') {
packageInfo.git = { branch: branch, hash: hash }; packageInfo.git = { branch: branch, hash: hash };