Browse Source

No need to specify `--dotenv`

master
Leo Lamprecht 8 years ago
parent
commit
5f0de768c3
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 10
      bin/now-deploy.js

10
bin/now-deploy.js

@ -372,9 +372,13 @@ async function sync(token) {
const now = new Now(apiUrl, token, {debug})
let dotenvConfig
const dotenvOption = argv.dotenv ? argv.dotenv : nowConfig.dotenv
if (dotenvOption) {
const dotenvFileName = typeof dotenvOption === 'string' ? dotenvOption : '.env'
if (argv.dotenv) {
if (nowConfig.dotenv) {
argv.dotenv = nowConfig.dotenv
}
const dotenvFileName = typeof argv.dotenv === 'string' ? argv.dotenv : '.env'
if (!fs.existsSync(dotenvFileName)) {
error(`--dotenv flag is set but ${dotenvFileName} file is missing`)

Loading…
Cancel
Save