Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress doT logging when options.verbose is not true #558

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions widdershins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const url = require('url');
const yaml = require('yaml');
const fetch = require('node-fetch');

const doT = require('dot');

const converter = require('./lib/index.js');

var argv = require('yargs')
Expand Down Expand Up @@ -186,6 +188,10 @@ if (argv.respec) {
if (options.respec) options.html = true;
if (options.html) options.omitHeader = true;

// doT.log is defaultly true.
// if options.verbose undefined or false, then, doT.log = false
if (options.verbose !== true) doT.log = false;

if (argv.environment) {
var e = fs.readFileSync(path.resolve(argv.environment),'utf8');
var env = {};
Expand Down