fix: prevent git CLI to prompt user/password on CI

This commit is contained in:
Pierre Vanduynslager
2018-03-16 14:33:18 -04:00
parent c84ac15020
commit 7c48afad47
2 changed files with 18 additions and 12 deletions
+4
View File
@@ -22,6 +22,10 @@ async function run(options, plugins) {
if (!isCi && !options.dryRun && !options.noCi) {
logger.log('This run was not triggered in a known CI environment, running in dry-run mode.');
options.dryRun = true;
} else {
// When running on CI, prevent the `git` CLI to prompt for username/password. See #703.
process.env.GIT_ASKPASS = 'echo';
process.env.GIT_TERMINAL_PROMPT = 0;
}
if (isCi && isPr && !options.noCi) {