Skip to content

Commit

Permalink
Merge pull request #682 from motdotla/version-in-log
Browse files Browse the repository at this point in the history
Version in log
  • Loading branch information
motdotla authored Sep 29, 2022
2 parents ca68067 + dd9700d commit 7ccc595
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const fs = require('fs')
const path = require('path')
const os = require('os')
const packageJson = require('../package.json')

const version = packageJson.version

const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg

Expand Down Expand Up @@ -44,7 +47,7 @@ function parse (src) {
}

function _log (message) {
console.log(`[dotenv][DEBUG] ${message}`)
console.log(`[dotenv@${version}][DEBUG] ${message}`)
}

function _resolveHome (envPath) {
Expand Down

0 comments on commit 7ccc595

Please sign in to comment.