1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 14:07:01 +09:00

JS-2201: sentry-cli hook

This commit is contained in:
Andrew Simachev 2023-08-05 13:28:58 +02:00
parent d4a482d45f
commit a98bffc221
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
6 changed files with 75 additions and 30 deletions

View file

@ -1,3 +1,4 @@
const { exec } = require('child_process');
const { app, shell, nativeTheme } = require('electron');
const { is } = require('electron-util');
const log = require('electron-log');
@ -224,6 +225,23 @@ class Util {
return data[key] || defaultData[key] || `⚠️${key}⚠️`;
};
execPromise (command) {
return new Promise(function(resolve, reject) {
exec(command, (error, stdout, stderr) => {
console.log('Error: ', error, stderr);
if (error || stderr) {
reject(error || stderr);
return;
};
console.log('Out: ', stdout.trim());
resolve(stdout.trim());
});
});
};
};
module.exports = new Util();