We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c32567 commit 94ec2a1Copy full SHA for 94ec2a1
src/main.js
@@ -75,12 +75,20 @@ async function main() {
75
describe: 'Set log level to verbose',
76
default: false,
77
})
78
+ .option('token', {
79
+ type: 'string',
80
+ describe: 'If set, update the .npmrc file with this token rather than the token obtained from ADC or gcloud.',
81
+ default: '',
82
+ })
83
.help()
84
.argv;
85
86
logger.logVerbose = allArgs.verbose;
87
const configPath = allArgs.config;
- const creds = await auth.getCreds();
88
+ var creds = allArgs.token;
89
+ if (creds == '') {
90
+ creds = await auth.getCreds();
91
+ }
92
if (configPath) {
93
console.warn('Updating project .npmrc inline is deprecated and may no longer be supported\n'
94
+ 'in future versions. Run the plugin with `--repo-config` and `--credential-config`.');
0 commit comments