Skip to content

Commit

Permalink
Just going to rollback to the version of Config that doesn't have the…
Browse files Browse the repository at this point in the history
… always lower casing bug: rust-cli/config-rs#531
  • Loading branch information
scottyancey committed Sep 15, 2024
1 parent e478927 commit d8067ee
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 111 deletions.
139 changes: 38 additions & 101 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ serde_json = "1.0.127"
meilisearch-sdk = "0.27.1"
colored = "2.1.0"
lazy_static = "1.5.0"
config = "0.14.0"
config = "0.13.4"

[dev-dependencies]
pretty_assertions = "1"
Expand Down
10 changes: 1 addition & 9 deletions src/bin/copy_configs_for_debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,10 @@ fn main() {

// Only need to grab the pairs from the [env] secion of this file
for pair in settings.get_table("env").unwrap().iter() {
let mut key: String = pair.0.clone();
// These need to be upper case, and the Config crate currently seems to have a bug which lowercases everything!
// https://github.com/mehcode/config-rs/issues/531
// TODO SWY: Keep track of the above bug and remove when fixed.
if pair.0 == "database_url" || pair.0 == "sqlx_offline" {
key = pair.0.to_uppercase();
}

test_override_configs.push_str(
format!(
"{} = \"{}\"\n",
key,
pair.0,
pair.1.to_owned().into_string().unwrap()
)
.as_str(),
Expand Down

0 comments on commit d8067ee

Please sign in to comment.