Skip to content

Commit

Permalink
Better error logs for diagnosing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Sep 30, 2023
1 parent 3aae578 commit 2378778
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/repository/qpackages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ impl QPMRepository {
if !src_path.exists() {
// if the tmp path exists, but src doesn't, that's a failed cache, delete it and try again!
if tmp_path.exists() {
fs::remove_dir_all(&tmp_path).context("Failed to remove existing tmp folder")?;
fs::remove_dir_all(&tmp_path).with_context(|| format!("Failed to remove existing tmp folder {tmp_path:?}"))?;
}

// src did not exist, this means that we need to download the repo/zip file from packageconfig.info.url
fs::create_dir_all(src_path.parent().unwrap()).context("Failed to create lib path")?;
fs::create_dir_all(&base_path)
.with_context(|| format!("Failed to create lib path {base_path:?}"))?;
let url = config.info.url.as_ref().unwrap();
if url.contains("github.com") {
// github url!
Expand Down

0 comments on commit 2378778

Please sign in to comment.