Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to DSC_CONFIG_ROOT env var #342

Merged
merged 9 commits into from
Mar 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix clippy 2
anmenaga committed Mar 4, 2024
commit 56986a690e5e7d8b2291d1dfda9fcf5cb009885b
4 changes: 2 additions & 2 deletions dsc/src/util.rs
Original file line number Diff line number Diff line change
@@ -412,7 +412,7 @@ pub fn absolutize_and_set_dscconfigroot(config_path: &str) -> String
let path = Path::new(config_path);

// make path absolute
let full_path = path.absolutize().unwrap();
let full_path = path.absolutize().unwrap_or_default();
let Some(config_root_path) = full_path.parent() else {
// this should never happen because path was absolutized
error!("Error reading config path parent");
@@ -422,7 +422,7 @@ pub fn absolutize_and_set_dscconfigroot(config_path: &str) -> String
let env_var = "DSC_CONFIG_ROOT";

// warn if env var is already set/used
if let Ok(_) = env::var(env_var) {
if env::var(env_var).is_ok() {
warn!("The current value of '{env_var}' env var will be overridden");
}