Skip to content

Commit

Permalink
fix: compute absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed May 11, 2024
1 parent b757eaa commit 291b3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion buildit-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pub async fn find_update_and_update_checksum(
bail!("{pkg} has no update");
}

let abbs_path_parent = if let Some(parent) = abbs_path.parent() {
let absolute_abbs_path = std::fs::canonicalize(abbs_path)?;
let abbs_path_parent = if let Some(parent) = absolute_abbs_path.parent() {
parent
} else {
bail!("Bad ABBS path");
Expand Down
4 changes: 2 additions & 2 deletions server/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,10 @@ pub async fn answer(bot: Bot, msg: Message, cmd: Command, pool: DbPool) -> Respo
bot.send_message(msg.chat.id, format!("Successfully opened PR: {url}"))
.await?
}
Err(e) => bot.send_message(msg.chat.id, e.to_string()).await?,
Err(e) => bot.send_message(msg.chat.id, format!("{:?}", e)).await?,
}
}
Err(e) => bot.send_message(msg.chat.id, e.to_string()).await?,
Err(e) => bot.send_message(msg.chat.id, format!("{:?}", e)).await?,
};
}
};
Expand Down

0 comments on commit 291b3b6

Please sign in to comment.