Skip to content

Commit

Permalink
fix: allow rekeying 0 secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Oct 14, 2024
1 parent 62da71e commit d6de009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/rekey.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
if [[ -e ${secretOut} ]] && [[ "$FORCE" != true ]]; then
echo " Skipping [already rekeyed] "${escapeShellArg hostName}":"${escapeShellArg secretName}""
else
mkdir -p ${rekeyedSecrets.cacheDir}/secrets
rm ${secretOut}.tmp &>/dev/null || true
echo " Rekeying "${escapeShellArg hostName}":"${escapeShellArg secretName}""
if ! decrypt ${escapeShellArg secret.rekeyFile} ${escapeShellArg secretName} ${escapeShellArg hostName} \
Expand All @@ -93,6 +92,7 @@
any_rekeyed=false
# Rekey secrets for ${hostName}
mkdir -p ${rekeyedSecrets.cacheDir}/secrets
${concatStringsSep "\n" (mapAttrsToList rekeyCommand secretsToRekey)}
# We need to save the rekeyed output when any secret was rekeyed, or when the
Expand Down

0 comments on commit d6de009

Please sign in to comment.