From 2f751dfbe1363a53db501dd8b5d3df5fb9b5783f Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Mon, 20 Apr 2020 19:12:26 +0100 Subject: [PATCH] OS-agnostic warning suppression 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 --- bin/cli.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index de9c08a4..ffaff1cc 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -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');