diff --git a/config.js b/config.js index 86d6fa5f..b7976850 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,8 @@ (function () { var options = {} - process.argv.forEach(function (val, idx, arr) { - var matches = val.match(/^dotenv_config_(.+)=(.+)/) + // skip first argv, which is node command + process.argv.slice(1).forEach(function (val) { + var matches = val.match(/^dotenv_config_([^=]+)=(.+)$/) if (matches) { options[matches[1]] = matches[2] }