From ece514133d195dbf8df82330117bd08aadad1c11 Mon Sep 17 00:00:00 2001 From: Roman Kivalin Date: Tue, 14 Apr 2026 14:33:11 +0200 Subject: [PATCH] Fix dry_run flag not passed to inline hooks Inline per-certificate hooks were always executed even in dry-run mode because the dry_run parameter was hardcoded to false. Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 2 ++ debian/changelog | 1 + src/renew.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76beb35..a222dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ### Fixes +- Fix inline hooks ignoring `--dry-run` flag + ### Changes ## 0.5.0 (2026-04-13) diff --git a/debian/changelog b/debian/changelog index 66656d1..fbb93d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ certforge (0.6.0-1) unstable; urgency=low * Named hooks with per-certificate reference and cross-cert dedup * Multiple listen addresses for HTTP-01 and TLS-ALPN-01 solvers + * Fix inline hooks ignoring --dry-run flag -- Roman Kivalin Mon, 14 Apr 2026 00:00:00 +0000 diff --git a/src/renew.rs b/src/renew.rs index 660110f..0957aa9 100644 --- a/src/renew.rs +++ b/src/renew.rs @@ -274,7 +274,7 @@ async fn renew_certificate( // Run inline (per-certificate) hooks if !cert_config.inline_hooks.is_empty() { - let hook_results = hooks::run_hooks(&cert_config.inline_hooks, false).await; + let hook_results = hooks::run_hooks(&cert_config.inline_hooks, dry_run).await; for result in &hook_results { if let Err(e) = result { tracing::warn!(error = %e, "inline hook failed (non-fatal)");