From 5cbb9bfbf9fc02c9727b85e3667363f8fe257b5e Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Fri, 5 Jan 2024 21:49:55 -0600 Subject: [PATCH] Honour --output-file when there are not Helm Releases (#494) Fix issue where diffs for no helm releases breaks the action output. --- flux_local/tool/diff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flux_local/tool/diff.py b/flux_local/tool/diff.py index 9cb59120..acdf8d78 100644 --- a/flux_local/tool/diff.py +++ b/flux_local/tool/diff.py @@ -375,7 +375,8 @@ async def run( # type: ignore[no-untyped-def] ) if not helm_visitor.releases and not orig_helm_visitor.releases: - print(selector.not_found("HelmRelease", query.helm_release)) + with open(output_file, "w") as file: + print(selector.not_found("HelmRelease", query.helm_release), file=file) return # Find HelmRelease objects with diffs and prune all other HelmReleases from