Skip to content

Commit

Permalink
chore: Add errors handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 29, 2020
1 parent 0d3a1e1 commit 0719acb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/executeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ export function executeCommand(command: string, args: string[], targetDir: strin
}
resolve();
});
child.on('error', (err) => {
reject(new Error(`command failed: ${err.message || ''}`));
})
});
}

0 comments on commit 0719acb

Please sign in to comment.