Skip to content

Commit

Permalink
fix judge CE
Browse files Browse the repository at this point in the history
  • Loading branch information
Zztrans committed Apr 4, 2024
1 parent 5dc53e0 commit 0f15be9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions judger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ In cmd-line mode, by providing the necessary arguments, it can run the code in a
## How to use

Run `cargo run --bin judger` to get help.

A simple example is:

`cargo run --bin judger judge --language cpp --problem-slug hello-world --src-path {}`
2 changes: 1 addition & 1 deletion judger/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct JudgerOpt {
#[structopt(long, default_value = "oj-lab-problem-package")]
pub problem_package_bucket: String,
/// Where to store problem package
#[structopt(env = "PROBLEM_PACKAGE_PATH", default_value = "problem-package")]
#[structopt(env = "PROBLEM_PACKAGE_PATH", default_value = "judger/workdirs/development/problem-package")]
pub problem_package_dir: PathBuf,
}

Expand Down
3 changes: 3 additions & 0 deletions judger/src/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ impl JudgeWorker {
}
Err(anyhow::anyhow!("Failed to new builder result: {:?}", e))
});
if new_builder_result.is_err() {
return new_builder_result.unwrap_err()
}
let builder = new_builder_result.expect("builder creater error");
log::debug!("Builder created: {:?}", builder);
let mut results: Vec<JudgeResultInfo> = vec![];
Expand Down

0 comments on commit 0f15be9

Please sign in to comment.