From 58e73ba815d31dbf5f25e74d50eb843b112fc3de Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Thu, 13 May 2021 08:46:26 +0200 Subject: [PATCH] Add --[no-]send-report options to diagnose (#392) * Add --[no-]send-report options to diagnose Replace the `--no-report` option--which turned sending the diagnose report to AppSignal's servers off--with `--send-report` and `--no-send-report`. By default, the report is not sent if you don't pass `--send-report`. --- .../.changesets/send-report-and-no-send-report-options.md | 8 ++++++++ packages/nodejs/bin/diagnose | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 packages/nodejs/.changesets/send-report-and-no-send-report-options.md diff --git a/packages/nodejs/.changesets/send-report-and-no-send-report-options.md b/packages/nodejs/.changesets/send-report-and-no-send-report-options.md new file mode 100644 index 00000000..f4ebad95 --- /dev/null +++ b/packages/nodejs/.changesets/send-report-and-no-send-report-options.md @@ -0,0 +1,8 @@ +--- +bump: "patch" +--- + +Replace the `--no-report` option--which turned sending the diagnose report +to AppSignal's servers off--with `--send-report` and `--no-send-report`. + +By default, the report is not sent if you don't pass `--send-report`. diff --git a/packages/nodejs/bin/diagnose b/packages/nodejs/bin/diagnose index 2d530380..f2b47eec 100755 --- a/packages/nodejs/bin/diagnose +++ b/packages/nodejs/bin/diagnose @@ -11,9 +11,9 @@ const { DiagnoseTool } = require("../dist/diagnose") // enable diagnose mode process.env["_APPSIGNAL_DIAGNOSE"] = "true" -// providing --no-report at runtime stops the report from bieng sent +// providing --send-report sends the report. --no-send-report stops the report from being sent // it can also be passed by @appsignal/cli -const shouldSendReport = !process.argv.includes("--no-report") +const shouldSendReport = process.argv.includes("--send-report") && !process.argv.includes("--no-send-report") const tool = new DiagnoseTool({})