Skip to content

Commit

Permalink
Allow skipping prompts when CI env variable is truthy
Browse files Browse the repository at this point in the history
  • Loading branch information
jschroed91 committed Nov 27, 2019
1 parent 7eb4255 commit 41b8b78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotenvUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ if (skipPrompts && skipPrompts !== 'false') {
configArgs.skipPrompts = true
}

// If an environment variable CI exists and evaluates to true, skip prompts.
if (!skipPrompts && (!!process.env.CI || !!process.env.ci)) {
configArgs.skipPrompts = true
}

const config = Object.assign({}, defaultConfig, fileJson.dotenvUpdater || {}, configArgs);

const sourceFile = path.resolve(process.cwd(), config.envFile)
Expand Down

0 comments on commit 41b8b78

Please sign in to comment.