Skip to content

Commit

Permalink
fix: Resolve path to .env
Browse files Browse the repository at this point in the history
  • Loading branch information
schw4rzlicht committed Jun 14, 2020
1 parent 4f60c91 commit 9d97959
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

const sentry = require("./dist/lib/sentry");
const packageInformation = require("./package.json");
const path = require("path");

require("dotenv").config();
require("dotenv").config({
path: path.resolve(__dirname, ".env")
});

if(process.env.NODE_ENV === "production" && !packageInformation.version.match(/^\d+\.\d+.\d+$/)) {
process.env.NODE_ENV = "staging";
Expand Down

0 comments on commit 9d97959

Please sign in to comment.