We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--global
1 parent db47ffc commit ebc9cc3Copy full SHA for ebc9cc3
lib/services/npm-config-service.ts
@@ -7,18 +7,16 @@ import { cache } from "../common/decorators";
7
export class NpmConfigService implements INpmConfigService {
8
private config: IDictionary<any> = {};
9
10
- constructor() {
+ public getConfig(): IDictionary<any> {
11
this.readConfig();
12
- }
13
14
- public getConfig(): IDictionary<any> {
15
return this.config;
16
}
17
18
@cache()
19
private readConfig(): void {
20
try {
21
- const res = execSync("npm config list --json");
+ const res = execSync("npm config list --json --global");
22
// const data: any = npmconfig.read();
23
const data: Record<string, any> = JSON.parse(res.toString());
24
0 commit comments