Skip to content

Commit

Permalink
Remove deprecated ENV vars #732
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Dec 7, 2023
1 parent 04ed9c8 commit 64d64a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ By far most changes relate to `atomic-server`, so if not specified, assume the c
**Changes to JS assets (including the front-end and JS libraries) are not shown here**, but in [`/browser/CHANGELOG`](/browser/CHANGELOG.md).
See [STATUS.md](server/STATUS.md) to learn more about which features will remain stable.

## UNRELEASED

- Use `musl` + `alpine` builds for docker images, way smaller images #620
- Support multi-platform docker builds #731
- Remove deprecated ENV vars #732

## [v0.36.1] - 2023-12-06

- Fix locally searching for atomicdata.dev resources in external servers #706
Expand Down
24 changes: 1 addition & 23 deletions server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub fn build_config(opts: Opts) -> AtomicServerResult<Config> {
} else {
atomic_lib::config::default_config_dir_path()?
};
let mut config_file_path = config_dir.join("config.toml");
let config_file_path = config_dir.join("config.toml");

let mut https_path = config_dir.clone();
https_path.push("https");
Expand All @@ -248,28 +248,6 @@ pub fn build_config(opts: Opts) -> AtomicServerResult<Config> {
let mut search_index_path = cache_dir.to_owned();
search_index_path.push("search_index");

for (key, value) in env::vars() {
match &*key {
"ATOMIC_CONFIG_FILE_PATH" => {
config_file_path = value.parse().map_err(|e| {
format!(
"Could not parse ATOMIC_CONFIG_FILE_PATH. Is {} a valid path? {}",
value, e
)
})?;
}
"ATOMIC_STORE_PATH" => {
store_path = value.parse().map_err(|e| {
format!(
"Could not parse ATOMIC_STORE_PATH. Is {} a valid path? {}",
value, e
)
})?;
}
_ => {}
}
}

let initialize = !std::path::Path::exists(&store_path) || opts.initialize;

if opts.https & opts.email.is_none() {
Expand Down

0 comments on commit 64d64a8

Please sign in to comment.