Show relative path by default instead of absolute

The absolute path is long and doesn't really provide much information.
  Plus, it's inconsistent with the behavior on a specified path.
This commit is contained in:
KtorZ 2024-09-07 18:24:46 +02:00
parent 943d90a99e
commit 28916c1ef9
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 5 additions and 1 deletions

View File

@ -94,8 +94,12 @@ where
{
let project_path = if let Some(d) = directory {
d.to_path_buf()
} else {
} else if std::env::consts::OS == "windows" {
env::current_dir().into_diagnostic()?
} else {
let mut current_dir = std::path::PathBuf::new();
current_dir.push(".");
current_dir
};
let mut project = match Project::new(project_path, Terminal) {