Skip to content

Commit aa34cd1

Browse files
clydindgp1130
authored andcommitted
fix(@angular/cli): support path spaces with temporary package installs
Fixes: #16865 (cherry picked from commit 0d6dae1)
1 parent 8169b69 commit aa34cd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/angular/cli/tasks/install-package.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ export function installTempPackage(
9797
// setup prefix/global modules path
9898
const packageManagerArgs = getPackageManagerArguments(packageManager);
9999
const tempNodeModules = join(tempPath, 'node_modules');
100+
// Yarn will not append 'node_modules' to the path
101+
const prefixPath = packageManager === PackageManager.Yarn ? tempNodeModules : tempPath;
100102
const installArgs: string[] = [
101-
packageManagerArgs.prefix,
102-
// Yarn will no append 'node_modules' to the path
103-
packageManager === PackageManager.Yarn ? tempNodeModules : tempPath,
103+
`${packageManagerArgs.prefix}="${prefixPath}"`,
104104
packageManagerArgs.noLockfile,
105105
];
106106

0 commit comments

Comments
 (0)