Skip to content

Commit

Permalink
fix(create): @bazel/create should verbose log based on VERBOSE_LOGS i…
Browse files Browse the repository at this point in the history
…nstead of COMPILATION_MODE
  • Loading branch information
gregmagolan committed Jan 2, 2020
1 parent a453efe commit c1b97d6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

const fs = require('fs');
const path = require('path');
const DEBUG = process.env['COMPILATION_MODE'] === 'dbg';
const VERBOSE_LOGS = !!process.env['VERBOSE_LOGS'];

function log_verbose(...m) {
if (VERBOSE_LOGS) console.error('[@bazel/create]', ...m);
}

/**
* Detect if the user ran `yarn create @bazel` so we can default
Expand Down Expand Up @@ -73,10 +77,8 @@ function main(argv, error = console.error, log = console.log) {
// Which package manager will be used in the new project
const pkgMgr = args['packageManager'] || detectRunningUnderYarn() ? 'yarn' : 'npm';

if (DEBUG) {
log('Running with', process.argv);
log('Environment', process.env);
}
log_verbose('Running with', process.argv);
log_verbose('Environment', process.env);

const [wkspDir] = args['_'];
// TODO: user might want these to differ
Expand Down

0 comments on commit c1b97d6

Please sign in to comment.