Skip to content

Commit

Permalink
(refactor): invert if in run function (#404)
Browse files Browse the repository at this point in the history
- better readability / changeability
  • Loading branch information
agilgur5 authored and swyxio committed Dec 29, 2019
1 parent ec0f285 commit e1370de
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,15 @@ prog
let successKiller: Killer = null;
let failureKiller: Killer = null;

function run(command: string) {
if (command) {
const [exec, ...args] = command.split(' ');

return execa(exec, args, {
stdio: 'inherit',
});
function run(command?: string) {
if (!command) {
return null;
}

return null;
const [exec, ...args] = command.split(' ');
return execa(exec, args, {
stdio: 'inherit',
});
}

function killHooks() {
Expand Down

0 comments on commit e1370de

Please sign in to comment.