sync
This commit is contained in:
parent
b31dcc3235
commit
e633f34765
@ -34,10 +34,13 @@ impl Config {
|
||||
}
|
||||
|
||||
pub fn from_env() -> Result<Self, SettingError> {
|
||||
if let Some(dir_path) = env::var("RSP_CONFIG")
|
||||
.ok()
|
||||
.map(|x| PathBuf::from(x))
|
||||
.or(dirs::config_dir())
|
||||
if let Some(dir_path) =
|
||||
std::env::current_dir().ok().or(
|
||||
env::var("RSP_CONFIG")
|
||||
.ok()
|
||||
.map(|x| PathBuf::from(x))
|
||||
.or(dirs::config_dir())
|
||||
)
|
||||
{
|
||||
let path = dir_path.join("rsp.toml");
|
||||
println!("{:?}", path);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user