Skip to content

Conversation

@ZennoZenith
Copy link

Using environment variable to set default config location #41

Description

Using env NVRS_CONFIG_DIR to set default config director
Precedence order is

  • custom location defined via --config
  • NVRS_CONFIG_DIR
  • XDG_CONFIG_HOME
  • ~/.config/nvrs

Context

Testing

Screenshots / Logs (if applicable)

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I made corresponding changes to the documentation.
  • I formatted the code with rustfmt.
  • I checked the lints with clippy.

@ZennoZenith ZennoZenith requested a review from koibtw as a code owner February 9, 2025 06:05
@ZennoZenith
Copy link
Author

I haven't updated the docs

Copy link
Owner

@koibtw koibtw left a comment

Choose a reason for hiding this comment

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

thanks for the PR!

@koibtw
Copy link
Owner

koibtw commented Feb 9, 2025

would also be nice to implement the fix mentioned in #40 (comment) but i'll probably do that in a separate PR

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
@koibtw
Copy link
Owner

koibtw commented Feb 9, 2025

wouldn't a NVRS_CONFIG_FILE approach be better?

@ZennoZenith
Copy link
Author

I used directory because maybe

oldver = "oldver.json"
newver = "newver.json"
keyfile = "n_keyfile.toml"

files could be stored in this directory by default

@koibtw
Copy link
Owner

koibtw commented Feb 13, 2025

would be nice to implement this for keyfile & verfiles.
+ i think it would work better as a CLI argument, not a variable.

@koibtw koibtw force-pushed the main branch 3 times, most recently from 69c3317 to 558e571 Compare October 15, 2025 12:19
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.

Using environment variable to set default config location

2 participants