File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/@vue/cli/lib/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const execa = require('execa')
55const minimist = require ( 'minimist' )
66const semver = require ( 'semver' )
77const LRU = require ( 'lru-cache' )
8+ const chalk = require ( 'chalk' )
89
910const {
1011 hasYarn,
@@ -13,6 +14,7 @@ const {
1314 hasProjectPnpm
1415} = require ( '@vue/cli-shared-utils/lib/env' )
1516const { isOfficialPlugin, resolvePluginId } = require ( '@vue/cli-shared-utils/lib/pluginResolution' )
17+ const { log, warn } = require ( '@vue/cli-shared-utils/lib/logger' )
1618
1719const { loadOptions } = require ( '../options' )
1820const getPackageJson = require ( './getPackageJson' )
@@ -76,7 +78,13 @@ class PackageManager {
7678 }
7779
7880 if ( ! SUPPORTED_PACKAGE_MANAGERS . includes ( this . bin ) ) {
79- throw new Error ( `Unknown package manager: ${ this . bin } ` )
81+ log ( )
82+ warn (
83+ `The package manager ${ chalk . red ( this . bin ) } is ${ chalk . red ( 'not officially supported' ) } .\n` +
84+ `It will be treated like ${ chalk . cyan ( 'npm' ) } , but compatibility issues may occur.\n` +
85+ `See if you can use ${ chalk . cyan ( '--registry' ) } instead.`
86+ )
87+ PACKAGE_MANAGER_CONFIG [ this . bin ] = PACKAGE_MANAGER_CONFIG . npm
8088 }
8189 }
8290
You can’t perform that action at this time.
0 commit comments