yeoman-environment 3.19.1 → 3.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/environment.js +11 -4
  2. package/package.json +1 -1
@@ -11,7 +11,6 @@ const memFs = require('mem-fs');
11
11
  const FileEditor = require('mem-fs-editor');
12
12
  const debug = require('debug')('yeoman:environment');
13
13
  const isScoped = require('is-scoped');
14
- const npmlog = require('npmlog');
15
14
  const semver = require('semver');
16
15
  const slash = require('slash');
17
16
  const {TrackerGroup} = require('are-we-there-yet');
@@ -1321,10 +1320,18 @@ class Environment extends Base {
1321
1320
  }
1322
1321
 
1323
1322
  const progress = this.adapter.progress ? this.adapter.progress.bind(this.adapter) : (async callback => {
1323
+ const npmlog = require('npmlog');
1324
+ log = log && !npmlog.progressEnabled;
1324
1325
  if (log) {
1325
- npmlog.tracker = new TrackerGroup();
1326
- npmlog.enableProgress();
1327
- log = npmlog.newItem(name);
1326
+ try {
1327
+ npmlog.tracker = new TrackerGroup();
1328
+ npmlog.enableProgress();
1329
+ log = npmlog.newItem(name);
1330
+ } catch {
1331
+ // Failed to enable progress.
1332
+ npmlog.disableProgress();
1333
+ log = false;
1334
+ }
1328
1335
  }
1329
1336
  try {
1330
1337
  await callback({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeoman-environment",
3
- "version": "3.19.1",
3
+ "version": "3.19.2",
4
4
  "description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
5
5
  "homepage": "http://yeoman.io",
6
6
  "author": "Yeoman",