Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Jul 20, 2023
1 parent 0b888cc commit ccd4c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const Log = require('./logger');
const _shell = require('shelljs');
const path = require('path');
const parse = require('yargs-parser');
const os = require('os');
const Promise = require('./promise');
const stdoutStream = require('through');
const stderrStream = require('through');
Expand Down Expand Up @@ -157,7 +156,8 @@ module.exports = class Shell {
this.log.silly('process %s had output', id, {stdout, stderr});
// Return
_.remove(this.running, proc => proc.id === id);
return (code !== 0) ? Promise.reject(new Error(`${cmd} failed with exit code ${code}\n:${stderr}`)) : Promise.resolve(stdout);
const msg = `${cmd} failed with exit code ${code}\n:${stderr}`;
return (code !== 0) ? Promise.reject(new Error(msg)) : Promise.resolve(stdout);
});
};

Expand Down

0 comments on commit ccd4c14

Please sign in to comment.