Skip to content

Commit

Permalink
sorcery suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaravm committed Aug 12, 2024
1 parent 786a855 commit 2d97a71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tokio = { version = "1", features = ["full"] }
serde_json = "^1.0"
tempfile = "3.2"
dirs = "5.0.1"
anyhow = "1.0.86"

[[bin]]
name = "cli"
Expand Down
5 changes: 3 additions & 2 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
match matches.subcommand() {
Some(("tes", sub)) => {
if let Some(("create", sub)) = sub.subcommand() {
let task_file = sub.value_of("TASK_FILE").unwrap();
let task_file = sub.value_of("TASK_FILE")
.ok_or_else(|| anyhow::anyhow!("TASK_FILE argument is required"))?;
// let url = sub.value_of("url").unwrap();
let path = Path::new(task_file);
if !path.exists() {
Expand Down Expand Up @@ -175,7 +176,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
println!("{:?}",task);
},
Err(e) => {
println!("Error creating TES instance: {:?}", e);
eprintln!("Error creating TES instance: {:?}", e);
return Err(e);
}
};
Expand Down

0 comments on commit 2d97a71

Please sign in to comment.