Skip to content

Commit

Permalink
refactor: ♻️ cleanup command execution process
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Feb 10, 2024
1 parent b854d14 commit 6eb07f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ mod tests {
let builder_output = Command::new("id")
.uid(builder_uid().ok_or_else(|| anyhow!("No such user: rsjudge-builder"))?)
.gid(builder_gid().ok_or_else(|| anyhow!("No such group: rsjudge-builder"))?)
.spawn()?
.wait_with_output()?;
.output()?;
println!("{}", String::from_utf8_lossy(&builder_output.stdout));
let runner_output = Command::new("id")
.uid(runner_uid().ok_or_else(|| anyhow!("No such user: rsjudge-runner"))?)
.gid(runner_gid().ok_or_else(|| anyhow!("No such group: rsjudge-runner"))?)
.spawn()?
.wait_with_output()?;
.output()?;
println!("{}", String::from_utf8_lossy(&runner_output.stdout));
Ok(())
}
Expand Down

0 comments on commit 6eb07f7

Please sign in to comment.