fix(rust): read .env like python-dotenv; dry run in the service environment
CI / Format & lint (push) Successful in 18s
CI / Test suite (push) Successful in 45s
Rust / fmt, clippy, test, build (push) Successful in 7m4s

dotenvy aborted on the production .env (a quote in an unquoted value makes it
read to the end of the file) and echoed the offending line, password
included. envfile.rs ports python-dotenv 1.1.1 (parser + ${VAR} interpolation,
no override): unparsable statements are skipped with a warning that names only
the line number. Verified against python-dotenv on 614 generated inputs
(testdata/). The .env is loaded before the tokio runtime starts.

install_collector.sh now runs the dry run through systemd-run with the unit's
User, WorkingDirectory and EnvironmentFile, i.e. exactly what the service sees.
This commit is contained in:
grabowski committed 2026-10-17 22:58:12 +07:00
1 parent 63353f1e80
commit c8e89840b5
9 files changed
+7456 -12

No files matched your search

-1
View File
@@ -1163,7 +1163,6 @@ dependencies = [
"anyhow",
"chrono",
"clap",
"dotenvy",
"reqwest",
"serde",
"serde_json",