fix: incorrect monorepo sub-plugin path resolution (#2186)

Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
Filipe Paniguel 2025-01-10 05:25:13 -03:00 committed by GitHub
parent 1e0c5ff61c
commit b495f78dfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -73,7 +73,7 @@ impl FromStr for Dependency {
use_: s.to_owned(),
name: format!("{name}.yazi"),
parent: format!("{parent}{}", if child.is_empty() { ".yazi" } else { "" }),
child: child.to_owned(),
child: if child.is_empty() { String::new() } else { format!("{child}.yazi") },
..Default::default()
})
}

View file

@ -43,8 +43,10 @@ impl Git {
}
async fn exec(f: impl FnOnce(&mut Command) -> &mut Command) -> Result<()> {
let status =
f(&mut Command::new("git")).status().await.context("Failed to execute `git` command")?;
let status = f(Command::new("git").args(["-c", "advice.detachedHead=false"]))
.status()
.await
.context("Failed to execute `git` command")?;
if !status.success() {
bail!("`git` command failed: {status}");