Skip to content

Commit

Permalink
fix: strip non-ansi characters from registry config (#5808)
Browse files Browse the repository at this point in the history
To deal with malformed stdout result retrieved from child processes.

Fixes #5802
  • Loading branch information
sodatea committed Aug 24, 2020
1 parent 5d002cc commit 27db6bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/@vue/cli/lib/util/ProjectPackageManager.js
Expand Up @@ -5,6 +5,8 @@ const ini = require('ini')
const minimist = require('minimist')
const LRU = require('lru-cache')

const stripAnsi = require('strip-ansi')

const {
chalk,
execa,
Expand Down Expand Up @@ -152,6 +154,7 @@ class PackageManager {
}
}

this._registry = stripAnsi(this._registry).trim()
return this._registry
}

Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli/package.json
Expand Up @@ -55,6 +55,7 @@
"resolve": "^1.17.0",
"shortid": "^2.2.15",
"slash": "^3.0.0",
"strip-ansi": "^6.0.0",
"validate-npm-package-name": "^3.0.0",
"vue": "^2.6.11",
"vue-codemod": "^0.0.4",
Expand Down

0 comments on commit 27db6bf

Please sign in to comment.