Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: B08517883D5E0E10
1 changed files with
7 additions and
3 deletions
-
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`) |
|
|
|