mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
fix(@angular/cli): support path spaces with temporary package installs
Fixes: #16865
This commit is contained in:
parent
5f3ff00dd8
commit
0d6dae107d
@ -97,10 +97,10 @@ export function installTempPackage(
|
|||||||
// setup prefix/global modules path
|
// setup prefix/global modules path
|
||||||
const packageManagerArgs = getPackageManagerArguments(packageManager);
|
const packageManagerArgs = getPackageManagerArguments(packageManager);
|
||||||
const tempNodeModules = join(tempPath, 'node_modules');
|
const tempNodeModules = join(tempPath, 'node_modules');
|
||||||
|
// Yarn will not append 'node_modules' to the path
|
||||||
|
const prefixPath = packageManager === PackageManager.Yarn ? tempNodeModules : tempPath;
|
||||||
const installArgs: string[] = [
|
const installArgs: string[] = [
|
||||||
packageManagerArgs.prefix,
|
`${packageManagerArgs.prefix}="${prefixPath}"`,
|
||||||
// Yarn will no append 'node_modules' to the path
|
|
||||||
packageManager === PackageManager.Yarn ? tempNodeModules : tempPath,
|
|
||||||
packageManagerArgs.noLockfile,
|
packageManagerArgs.noLockfile,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user