Skip to content

Commit

Permalink
Fix handlebars helper registration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywonchung committed Sep 4, 2023
1 parent 30b168a commit c0f2bdc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pegasus-ssh"
description = "Pegasus: A Multi-Node SSH Command Runner"
authors = ["Jae-Won Chung <jaewon.chung.cs@gmail.com>"]
version = "1.1.2"
version = "1.1.3"
edition = "2021"
repository = "https://github.com/jaywonchung/pegasus"
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions src/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ impl Cmd {
self.params.insert("hostname".to_string(), host.hostname);
register
.render(&self.command, &self.params)
.unwrap_or_else(|_| {
.unwrap_or_else(|e| {
panic!(
"Failed to render command template '{}' with params '{:#?}'",
&self.command, &self.params
"Failed to render command template '{}' with params '{:#?}'. Error: {:?}",
&self.command, &self.params, e
)
})
}
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ async fn run_queue(cli: &Config) -> Result<(), openssh::Error> {
.expect("Failed to connect to host");
// Handlebars registry for filling in parameters.
let mut registry = Handlebars::new();
handlebars_misc_helpers::register(&mut registry);
// When cancellation happens, the scheduling loop will detect that and drop
// `notify_rx` and `command_tx`. Thus we can break out of the loop and
// gracefully terminate the session.
Expand Down

0 comments on commit c0f2bdc

Please sign in to comment.