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:
parent
d4a482d45f
commit
a98bffc221
6 changed files with 75 additions and 30 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue