[PR #1212] [MERGED] Added error handling during dotenv loading #6556

Closed
opened 2026-03-07 21:00:52 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/1212
Author: @BlackDex
Created: 10/31/2020
Status: Merged
Merged: 11/14/2020
Merged by: @dani-garcia

Base: masterHead: dotenv-warnings


📝 Commits (1)

  • d11d663 Added error handling during dotenv loading

📊 Changes

1 file changed (+26 additions, -1 deletions)

View changed files

📝 src/config.rs (+26 -1)

📄 Description

Some issue people report are because of misconfiguration or bad .env
files. To mittigate this i added error handling for this.

  • Panic/Quit on a LineParse error, which indicates bad .env file format.
  • Emits a info message when there is no .env file found.
  • Emits a warning message when there is a .env file, but not no permissions.
  • Emits a warning on every other message not specifically catched.

This partially fixes #1196 by reporting the line regarding spaces.
Solving that ticket by allowing spaces would be difficult from within
bitwarden_rs it self.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/1212 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/31/2020 **Status:** ✅ Merged **Merged:** 11/14/2020 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `dotenv-warnings` --- ### 📝 Commits (1) - [`d11d663`](https://github.com/dani-garcia/vaultwarden/commit/d11d663c5c7ff12d1eb737c9e073d50f5c3f5a53) Added error handling during dotenv loading ### 📊 Changes **1 file changed** (+26 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/config.rs` (+26 -1) </details> ### 📄 Description Some issue people report are because of misconfiguration or bad .env files. To mittigate this i added error handling for this. - Panic/Quit on a LineParse error, which indicates bad .env file format. - Emits a info message when there is no .env file found. - Emits a warning message when there is a .env file, but not no permissions. - Emits a warning on every other message not specifically catched. This partially fixes #1196 by reporting the line regarding spaces. Solving that ticket by allowing spaces would be difficult from within bitwarden_rs it self. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-07 21:00:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#6556