Skip to content

Commit

Permalink
feat: accept same cli args as squeue
Browse files Browse the repository at this point in the history
  • Loading branch information
kabouzeid committed Mar 28, 2023
1 parent 7e6678d commit 1f1a5ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/job_watcher.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::env;
use std::path::PathBuf;
use std::{io::BufRead, process::Command, thread, time::Duration};

Expand Down Expand Up @@ -40,8 +41,11 @@ impl JobWatcher {
.map(|s| s.to_owned() + ":" + output_separator)
.join(",");

let cli_args = env::args().skip(1).collect::<Vec<_>>();

loop {
let jobs: Vec<Job> = Command::new("squeue")
.args(&cli_args)
.arg("-h")
.arg("-O")
.arg(&output_format)
Expand Down

0 comments on commit 1f1a5ac

Please sign in to comment.