Merge pull request #16 from RatCornu/steel

Optionally load init.scm and helix.scm from env var
pull/8675/merge^2
Matthew Paras 2025-04-19 09:18:06 -07:00 committed by GitHub
commit 9bb634ab4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1444,7 +1444,9 @@ fn local_config_exists() -> bool {
}
fn preferred_config_path(file_name: &str) -> PathBuf {
if local_config_exists() {
if let Ok(steel_config_dir) = std::env::var("HELIX_STEEL_CONFIG") {
PathBuf::from(steel_config_dir).join(file_name)
} else if local_config_exists() {
find_workspace().0.join(".helix").join(file_name)
} else {
helix_loader::config_dir().join(file_name)