Skip to content

Commit

Permalink
feat(cli): log exit status code and when script is done
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jun 5, 2020
1 parent 16b6d61 commit a887f17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const exec = command => execSync(command, execSyncOptions);
*/
const log = (...args) => console.log('INFO:', ...args);

process.on('exit', code => {
log(`Exiting with code: ${code}`);
});

/**
* Display package info.
*/
Expand Down Expand Up @@ -67,3 +71,5 @@ readdirSync(filesPath).forEach(filename => {
log(`Copying \`${filename}\``);
copyFileSync(source, destination);
});

log(`${name} done`);

0 comments on commit a887f17

Please sign in to comment.