File tree 1 file changed +3
-9
lines changed
tests/legacy-cli/e2e/utils
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { getGlobalVariable } from './env' ;
2
- import { ProcessOutput , npm , silentNpm , silentYarn } from './process' ;
2
+ import { ProcessOutput , silentNpm , silentYarn } from './process' ;
3
3
4
4
export function getActivePackageManager ( ) : 'npm' | 'yarn' {
5
5
const value = getGlobalVariable ( 'package-manager' ) ;
@@ -49,17 +49,11 @@ export async function setRegistry(useTestRegistry: boolean): Promise<void> {
49
49
? getGlobalVariable ( 'package-registry' )
50
50
: 'https://registry.npmjs.org' ;
51
51
52
- const isCI = getGlobalVariable ( 'ci' ) ;
53
52
const isSnapshotBuild = getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ;
54
53
55
54
// Ensure local test registry is used when outside a project
56
- if ( isCI ) {
57
- // Safe to set a user configuration on CI
58
- await npm ( 'config' , 'set' , 'registry' , url ) ;
59
- } else {
60
- // Yarn supports both `NPM_CONFIG_REGISTRY` and `YARN_REGISTRY`.
61
- process . env [ 'NPM_CONFIG_REGISTRY' ] = url ;
62
- }
55
+ // Yarn supports both `NPM_CONFIG_REGISTRY` and `YARN_REGISTRY`.
56
+ process . env [ 'NPM_CONFIG_REGISTRY' ] = url ;
63
57
64
58
// Snapshot builds may contain versions that are not yet released (e.g., RC phase main branch).
65
59
// In this case peer dependency ranges may not resolve causing npm 7+ to fail during tests.
You can’t perform that action at this time.
0 commit comments