Skip to content

Commit

Permalink
remove not needed function
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 committed Jan 15, 2025
1 parent 0174878 commit 3c28351
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions backend/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,6 @@ module.exports = {
return stdout;
},

/**
* @param {String} cmd
* @param {Array} args
*/
execfg: function (cmd, args) {
return new Promise((resolve, reject) => {
logger.debug('CMD: ' + cmd + ' ' + (args ? args.join(' ') : ''));
const childProcess = spawn(cmd, args, {
shell: true,
detached: true,
stdio: 'inherit',
});

childProcess.on('error', (err) => {
reject(err);
});

childProcess.on('close', (code) => {
if (code !== 0) {
reject(new Error(`Command '${cmd}' exited with code ${code}`));
} else {
resolve();
}
});
});
},

/**
* Used in objection query builder
*
Expand Down

0 comments on commit 3c28351

Please sign in to comment.