From 24944cf868ec2f76052824924cb2d2d88ad3ee35 Mon Sep 17 00:00:00 2001 From: mikeTWC1984 <31977106+mikeTWC1984@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:25:50 -0500 Subject: [PATCH] shellplug ENV_FILE option --- bin/shell-plugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/shell-plugin.js b/bin/shell-plugin.js index ecc9d78..cf502cb 100644 --- a/bin/shell-plugin.js +++ b/bin/shell-plugin.js @@ -12,7 +12,11 @@ const path = require('path'); const JSONStream = require('pixl-json-stream'); const Tools = require('pixl-tools'); -require('dotenv').config() +if(process.env['ENV_FILE']) { + try { + require('dotenv').config({path: process.env['ENV_FILE']}) + } catch { } +} // setup stdin / stdout streams process.stdin.setEncoding('utf8');