Skip to content

Commit c1b97d6

Browse files
committed
fix(create): @bazel/create should verbose log based on VERBOSE_LOGS instead of COMPILATION_MODE
1 parent a453efe commit c1b97d6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

packages/create/index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
const fs = require('fs');
44
const path = require('path');
5-
const DEBUG = process.env['COMPILATION_MODE'] === 'dbg';
5+
const VERBOSE_LOGS = !!process.env['VERBOSE_LOGS'];
6+
7+
function log_verbose(...m) {
8+
if (VERBOSE_LOGS) console.error('[@bazel/create]', ...m);
9+
}
610

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

76-
if (DEBUG) {
77-
log('Running with', process.argv);
78-
log('Environment', process.env);
79-
}
80+
log_verbose('Running with', process.argv);
81+
log_verbose('Environment', process.env);
8082

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

0 commit comments

Comments
 (0)