Skip to content

Commit

Permalink
bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
MordechaiHadad committed Sep 11, 2024
1 parent 3572df1 commit d6d5616
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
}
- {
NAME: macos,
OS: macos-latest-large,
OS: macos-13,
ARCH: x86_64,
PATH: target/optimized/bob,
}
Expand Down
18 changes: 7 additions & 11 deletions src/handlers/use_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,13 @@ async fn copy_nvim_proxy(config: &Config) -> Result<()> {
async fn copy_file_with_error_handling(old_path: &Path, new_path: &Path) -> Result<()> {
match fs::copy(&old_path, &new_path).await {
Ok(_) => Ok(()),
Err(e) => {
match e.raw_os_error() {
Some(26) | Some(32) => {
Err(anyhow::anyhow!(
"The file {} is busy. Please make sure to close any processes using it.",
old_path.display()
))
}
_ => Err(anyhow::anyhow!(e).context("Failed to copy file")),
}
}
Err(e) => match e.raw_os_error() {
Some(26) | Some(32) => Err(anyhow::anyhow!(
"The file {} is busy. Please make sure to close any processes using it.",
old_path.display()
)),
_ => Err(anyhow::anyhow!(e).context("Failed to copy file")),
},
}
}

Expand Down

0 comments on commit d6d5616

Please sign in to comment.