Skip to content

Commit ce5f661

Browse files
committed
Fix regrettable trigger help heading when no app
Signed-off-by: itowlson <[email protected]>
1 parent 04aa3bb commit ce5f661

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crates/trigger/src/cli.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,13 @@ fn warn_if_wasm_build_slothful() -> sloth::SlothGuard {
256256
}
257257

258258
fn help_heading<E: TriggerExecutor>() -> Option<&'static str> {
259-
let heading = format!("{} TRIGGER OPTIONS", E::TRIGGER_TYPE.to_uppercase());
260-
let as_str = Box::new(heading).leak();
261-
Some(as_str)
259+
if E::TRIGGER_TYPE == help::HelpArgsOnlyTrigger::TRIGGER_TYPE {
260+
Some("TRIGGER OPTIONS")
261+
} else {
262+
let heading = format!("{} TRIGGER OPTIONS", E::TRIGGER_TYPE.to_uppercase());
263+
let as_str = Box::new(heading).leak();
264+
Some(as_str)
265+
}
262266
}
263267

264268
pub mod help {

0 commit comments

Comments
 (0)