Skip to content

Commit

Permalink
fix: correctly catch errors of offline install
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea authored and mactanxin committed Feb 11, 2020
1 parent a7f9705 commit 136add4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli/lib/util/ProjectPackageManager.js
Expand Up @@ -243,9 +243,9 @@ class PackageManager {
async install () {
if (process.env.VUE_CLI_TEST) {
try {
return this.runCommand([PACKAGE_MANAGER_CONFIG[this.bin].install, '--offline'])
await this.runCommand([PACKAGE_MANAGER_CONFIG[this.bin].install, '--offline'])
} catch (e) {
this.runCommand([PACKAGE_MANAGER_CONFIG[this.bin].install])
await this.runCommand([PACKAGE_MANAGER_CONFIG[this.bin].install])
}
}

Expand Down

0 comments on commit 136add4

Please sign in to comment.