In Git2 error fixing, opening the repo is still currently unavailable.

This commit is contained in:
2026-01-30 18:29:11 +08:00
parent 2a57946421
commit 1cbb01ccc4
10 changed files with 42 additions and 19 deletions

View File

@@ -352,7 +352,7 @@ impl ProfileCommand {
async fn set_repo(&self, name: &str) -> Result<()> {
let mut manager = ConfigManager::new()?;
let repo = find_repo(".")?;
let repo = find_repo(std::env::current_dir()?.as_path())?;
let repo_path = repo.path().to_string_lossy().to_string();
@@ -381,7 +381,7 @@ impl ProfileCommand {
profile.apply_global()?;
println!("{} Applied profile '{}' globally", "".green(), profile.name.cyan());
} else {
let repo = find_repo(".")?;
let repo = find_repo(std::env::current_dir()?.as_path())?;
profile.apply_to_repo(repo.inner())?;
println!("{} Applied profile '{}' to current repository", "".green(), profile.name.cyan());
}