Skip to content

Commit 8c04e72

Browse files
authored
Merge pull request #2326 from Jamesbarford/fix/rust-timer-error-no-params
Fix - return an error if `@rust-timer` is given no arguments
2 parents 1541b06 + a1d3a52 commit 8c04e72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

site/src/request_handlers/github.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ async fn handle_rust_timer(
158158
Err(error) => errors.push_str(&format!("Cannot parse build command: {error}\n")),
159159
}
160160
}
161+
162+
if valid_build_cmds.is_empty() {
163+
errors.push_str("@rust-timer command cannot be empty\n");
164+
}
165+
161166
if !errors.is_empty() {
162167
main_client.post_comment(issue.number, errors).await;
163168
return Ok(github::Response);

0 commit comments

Comments
 (0)