Skip to content

Commit

Permalink
OS-agnostic warning suppression
Browse files Browse the repository at this point in the history
closes #309, refs #307, refs nodejs/node#32876

- removes all the weird flags from the shebang which explode various OSes
- instead use process.removeAllListeners() which should prevent warnings from being displayed using the node API and therefore in an OS-agnostic way
  • Loading branch information
ErisDS committed Apr 20, 2020
1 parent eab6793 commit 2f751df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env -S node --no-warnings
#!/usr/bin/env node

// Remove all Node warnings before doing anything else
process.removeAllListeners('warning');

const prettyCLI = require('@tryghost/pretty-cli');
const ui = require('@tryghost/pretty-cli').ui;
const _ = require('lodash');
Expand Down

0 comments on commit 2f751df

Please sign in to comment.