Skip to content

feat: Add environment variable substitution in config files - #1577

Merged
aawsome merged 1 commit into
rustic-rs:mainfrom
rdelaage:feat/subst
Oct 10, 2025
Merged

aawsome merged 1 commit into
rustic-rs:mainfrom
rdelaage:feat/subst

Conversation

@rdelaage

Copy link
Copy Markdown
Contributor

closes #942

This PR brings support for environment variable substitution in config files. This simply uses the subst crate to parse all environment variables before parsing the toml, this allows to define toml values in environment variables for more flexibility.

@aawsome aawsome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot @rdelaage

@aawsome
aawsome added this pull request to the merge queue Oct 10, 2025
Merged via the queue into rustic-rs:main with commit d382d74 Oct 10, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Nov 8, 2025
## 🤖 New release

* `rustic-rs`: 0.10.0 -> 0.10.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.10.1](v0.10.0...v0.10.1)
- 2025-11-08

### Added

- Add rewrite command
([#1583](#1583))
- *(interactive)* Add --interactive option to ls
([#1564](#1564))
- Add filter-last option
([#1574](#1574))
- Add environment variable substitution in config files
([#1577](#1577))

### Fixed

- Fix typos using the typos tool
([#1590](#1590))
- *(metrics)* use short-lived local registry
([#1575](#1575))
- fix clippy lints
([#1570](#1570))
- wrong env var for grouping option
([#1566](#1566))

### Other

- update dependencies
([#1594](#1594))
- (security) Update fuser
([#1569](#1569))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
Co-authored-by: Alexander Weiss <alex@weissfam.de>
github-merge-queue Bot pushed a commit that referenced this pull request Nov 10, 2025
…opted-in (#1600)

Hi!

This PR fix the regression introduced in #1577 by adding an opt-in flag
for environment variable substitution in profile files. Users can still
use `$` in their file if they enable substitution by escaping them
(`\$`).

This PR closes #1598 and #942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment variables in the config files not supported

2 participants