Skip to content

Commit fb4ec54

Browse files
author
SPRINX0\prochazka
committed
secret in env var support
1 parent b6226cf commit fb4ec54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diflow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ program
1717
.option('--skip-push', 'skip pushing changes to remote')
1818
.option(
1919
'--secret <string>',
20-
'secret for accessing repo. URLs of git repos should be in shape https://${SECRET}@<url>'
20+
'secret for accessing repo. URLs of git repos should be in shape https://${SECRET}@<url>. You could also use DIFLOW_GIT_SECRET env variable.'
2121
)
2222
.option('--clear', 'clear work repos before running')
2323
.action(options => {
@@ -27,7 +27,7 @@ program
2727
const processor = new Processor(options.repo, path.join(__dirname, 'workrepos'), options.branch, {
2828
skipPush: options.skipPush,
2929
clear: options.clear,
30-
secret: options.secret,
30+
secret: options.secret ?? process.env.DIFLOW_GIT_SECRET,
3131
});
3232
processor.process();
3333
console.log('Processing complete.');

0 commit comments

Comments
 (0)