cmds.secrets.lib.FilesContext: Fix: Inexistent secrets
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m19s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m31s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m22s
CI / Packaging test (push) Successful in 0s

"jw-pkg secrets compile-templates" errors out over checking the contents of inexistent secrets, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-13 07:57:46 +02:00
commit 9b87ba6c98
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -159,9 +159,9 @@ class FilesContext:
else:
old_mode = stat.S_IMODE(st.mode)
old_meta = self._format_metadata(st.owner, st.group, old_mode)
old_content = (await self.ctx.get(dst)).stdout_str
old_content = (await self.ctx.get(dst)).stdout_str_or_none
content_changed = old_content != new_content
content_changed = old_content is None or old_content != new_content
metadata_changed = (
st.owner != owner or st.group != group or old_mode != mode
)