Repository navigation
fix(cli): load the default .env when DOTENV_PATH is empty - #1076
Merged
Merged
Conversation
Owner
|
good catch here |
Owner
|
going out as 18.0.9 now. thanks! |
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Oct 24, 2026
| datasource | package | from | to | | ---------- | ------- | ------ | ------ | | npm | dotenv | 18.0.7 | 18.0.9 | ## [v18.0.9](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#1076](motdotla/dotenv#1076)) ## [v18.0.8](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) ##### Changed - Fast parser should strip appended extra quotes ([#1073](motdotla/dotenv#1073)) - Type detail improvement ([#1074](motdotla/dotenv#1074))
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 27, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [dotenv](https://github.com/motdotla/dotenv) | [`18.0.7` → `18.0.9`](https://renovatebot.com/diffs/npm/dotenv/18.0.7/18.0.9) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information. --- ### Release Notes <details> <summary>motdotla/dotenv (dotenv)</summary> ### [`v18.0.9`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) [Compare Source](motdotla/dotenv@v18.0.8...v18.0.9) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#​1076](motdotla/dotenv#1076)) ### [`v18.0.8`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) [Compare Source](motdotla/dotenv@v18.0.7...v18.0.8) ##### Changed - Fast parser should strip appended extra quotes ([#​1073](motdotla/dotenv#1073)) - Type detail improvement ([#​1074](motdotla/dotenv#1074)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2032
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 29, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [dotenv](https://github.com/motdotla/dotenv) | [`18.0.7` → `18.0.9`](https://renovatebot.com/diffs/npm/dotenv/18.0.7/18.0.9) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information. --- ### Release Notes <details> <summary>motdotla/dotenv (dotenv)</summary> ### [`v18.0.9`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) [Compare Source](motdotla/dotenv@v18.0.8...v18.0.9) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#​1076](motdotla/dotenv#1076)) ### [`v18.0.8`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) [Compare Source](motdotla/dotenv@v18.0.7...v18.0.8) ##### Changed - Fast parser should strip appended extra quotes ([#​1073](motdotla/dotenv#1073)) - Type detail improvement ([#​1074](motdotla/dotenv#1074)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2032
OIRNOIR
pushed a commit
to OIRNOIR/YouTube-Helper-Server
that referenced
this pull request
Oct 29, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [dotenv](https://github.com/motdotla/dotenv) | imports | patch | [`18.0.8` -> `18.0.9`](https://renovatebot.com/diffs/npm/dotenv/18.0.8/18.0.9) | --- ### Release Notes <details> <summary>motdotla/dotenv (dotenv)</summary> ### [`v18.0.9`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) [Compare Source](motdotla/dotenv@v18.0.8...v18.0.9) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#​1076](motdotla/dotenv#1076)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODIuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/65
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Oct 30, 2026
| datasource | package | from | to | | ---------- | ------- | ------ | ------ | | npm | dotenv | 18.0.7 | 18.0.9 | ## [v18.0.9](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#1076](motdotla/dotenv#1076)) ## [v18.0.8](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) ##### Changed - Fast parser should strip appended extra quotes ([#1073](motdotla/dotenv#1073)) - Type detail improvement ([#1074](motdotla/dotenv#1074))
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Nov 1, 2026
| datasource | package | from | to | | ---------- | ------- | ------ | ------ | | npm | dotenv | 18.0.7 | 18.0.9 | ## [v18.0.9](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#1076](motdotla/dotenv#1076)) ## [v18.0.8](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) ##### Changed - Fast parser should strip appended extra quotes ([#1073](motdotla/dotenv#1073)) - Type detail improvement ([#1074](motdotla/dotenv#1074))
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Nov 4, 2026
| datasource | package | from | to | | ---------- | ------- | ------ | ------ | | npm | dotenv | 18.0.7 | 18.0.9 | ## [v18.0.9](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1809-2026-10-14) ##### Changed - Permit DOTENV_PATH being empty string with the CLI ([#1076](motdotla/dotenv#1076)) ## [v18.0.8](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1808-2026-10-14) ##### Changed - Fast parser should strip appended extra quotes ([#1073](motdotla/dotenv#1073)) - Type detail improvement ([#1074](motdotla/dotenv#1074))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dotenv runtreats an emptyDOTENV_PATH(or legacyDOTENV_CONFIG_PATH) as an explicit path.''resolves to the current directory, so reading it fails and the command never runs:config()already treats an empty path as unset and loads the default.env. The CLI does the same for an emptyDOTENV_ENCODING. Empty values are common when a variable is forwarded but never set, e.g.DOTENV_PATH=${DOTENV_PATH}in Docker Compose or CI.With this change the CLI only uses the environment path when it is non-empty. Otherwise it keeps the default
.env, including the allowance for that file being missing. An emptyDOTENV_PATHstill does not fall back toDOTENV_CONFIG_PATH.Tests
DOTENV_PATHandDOTENV_CONFIG_PATH. It fails withEISDIRbefore the fix.npm test(build, standard, TypeScript check): 1,408 passing assertions and 1 platform skip, on Node 26 / Windows.npm run test:perf: passes the 1.5x gate.