You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Tools: Add repeat mechanism when electron-builder randomly fails to build
This commit is contained in:
22
packages/app-desktop/tools/execCommand.js
Normal file
22
packages/app-desktop/tools/execCommand.js
Normal file
@ -0,0 +1,22 @@
|
||||
const execCommand = (command) => {
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
console.info(`Running: ${command}`);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(command, (error, stdout) => {
|
||||
if (error) {
|
||||
if (error.signal === 'SIGTERM') {
|
||||
resolve('Process was killed');
|
||||
} else {
|
||||
error.stdout = stdout;
|
||||
reject(error);
|
||||
}
|
||||
} else {
|
||||
resolve(stdout.trim());
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = execCommand;
|
Reference in New Issue
Block a user