From c538aacdea538213acfec9ef3e3224076fc031ec Mon Sep 17 00:00:00 2001 From: Mathias Helmuth Pedersen Date: Tue, 24 Oct 2017 01:01:50 +0200 Subject: [PATCH] Disable when output is not TTY --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index a1252bb..0876747 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,10 @@ var progressOptions = { }; function SimpleProgressPlugin(options) { + if (!process.stderr.isTTY) { + return function () {}; + } + if (options) { messageTemplate = options.messageTemplate || messageTemplate; progressOptions = objectAssign(progressOptions, options.progressOptions);