Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 30, 2026

Summary

Prevents the optional .env file from producing noisy [MISSING_ENV_FILE] console output by gating dotenvx.config() behind a file-exists check.

Changes

  • src/extension.ts: Added fs.existsSync() check before calling dotenvx.config()
  • src/tests/extension.spec.ts: Added tests for both file-exists and file-missing scenarios

Testing

All 6 tests in extension.spec.ts pass.


Important

Add file existence check for optional .env in extension.ts to prevent console errors, with tests added in extension.spec.ts.

  • Behavior:
    • In extension.ts, added fs.existsSync() check before calling dotenvx.config() to prevent [MISSING_ENV_FILE] error when .env is missing.
  • Testing:
    • In extension.spec.ts, added tests for scenarios where .env file exists and does not exist.
    • All 6 tests in extension.spec.ts pass.

This description was created by Ellipsis for 78bb945. You can customize this summary. It will automatically update as commits are pushed.

Gate dotenvx.config() behind fs.existsSync() to suppress noisy
[MISSING_ENV_FILE] console errors when the optional .env file is absent.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 30, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 30, 2026

Oroocle Clock   See task on Roo Cloud

Review complete. No issues found; ready to merge.

  • No changes requested
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 30, 2026
@hannesrudolph hannesrudolph merged commit 20d1f1f into main Jan 30, 2026
13 checks passed
@hannesrudolph hannesrudolph deleted the fix/optional-env-noise branch January 30, 2026 23:15
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

No open projects
Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants