mirror of https://github.com/astral-sh/ruff
Use a platform-appropriate location for user configuration (#215)
This commit is contained in:
parent
b8f878df5e
commit
f2fd7335ce
|
|
@ -67,7 +67,10 @@ fn find_pyproject_toml(path: Option<&Path>) -> Option<PathBuf> {
|
|||
}
|
||||
|
||||
fn find_user_pyproject_toml() -> Option<PathBuf> {
|
||||
dirs::home_dir().map(|path| path.join(".ruff"))
|
||||
let mut path = dirs::config_dir()?;
|
||||
path.push("ruff");
|
||||
path.push("pyproject.toml");
|
||||
Some(path)
|
||||
}
|
||||
|
||||
fn find_project_root(sources: &[PathBuf]) -> Option<PathBuf> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue