File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
tests/legacy-cli/e2e/tests/misc Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
- import { rimraf } from '../../utils/fs' ;
1
+ import { rimraf , writeFile } from '../../utils/fs' ;
2
2
import { getActivePackageManager } from '../../utils/packages' ;
3
3
import { ng , npm } from '../../utils/process' ;
4
4
import { expectToFail } from '../../utils/utils' ;
@@ -60,6 +60,8 @@ export default async function() {
60
60
}
61
61
62
62
// Ensure `ng new --package-manager=yarn` executes successfully
63
+ // Need an additional npmrc file since yarn does not use the NPM registry environment variable
64
+ await writeFile ( '.npmrc' , 'registry=http://localhost:4873' )
63
65
const { stderr : stderrNewYarn } = await ng ( 'new' , 'npm-seven-yarn' , '--package-manager=yarn' ) ;
64
66
if ( stderrNewYarn . includes ( errorText ) ) {
65
67
throw new Error ( 'ng new --package-manager=yarn expected to not show npm version error.' ) ;
@@ -68,6 +70,7 @@ export default async function() {
68
70
// Cleanup extra test projects
69
71
await rimraf ( 'npm-seven-skip' ) ;
70
72
await rimraf ( 'npm-seven-yarn' ) ;
73
+ await rimraf ( '.npmrc' ) ;
71
74
72
75
// Change directory back
73
76
process . chdir ( currentDirectory ) ;
You can’t perform that action at this time.
0 commit comments