fix(@angular/cli): support path spaces with temporary package installs

Fixes: #16865
This commit is contained in:
Charles Lyding 2020-02-07 13:09:12 -05:00 committed by Douglas Parker
parent 5f3ff00dd8
commit 0d6dae107d

View File

@ -97,10 +97,10 @@ export function installTempPackage(
// setup prefix/global modules path
const packageManagerArgs = getPackageManagerArguments(packageManager);
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[] = [
packageManagerArgs.prefix,
// Yarn will no append 'node_modules' to the path
packageManager === PackageManager.Yarn ? tempNodeModules : tempPath,
`${packageManagerArgs.prefix}="${prefixPath}"`,
packageManagerArgs.noLockfile,
];