Browse Source

Allow dotenv option in now.json

master
tim neutkens 8 years ago
committed by Leo Lamprecht
parent
commit
8c8db8ecf8
  1. 5
      bin/now-deploy.js

5
bin/now-deploy.js

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

Loading…
Cancel
Save