Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decryption check condition #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix decryption check condition
`-x` checks for the existence of a file.  I think something like `! -z` was intended (`-z` checks for empty string).  There is also a `-n` which is equivalent to `! -z`.  So switch to `-n` and quote the expansion to avoid syntax errors.
dbingham authored Nov 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit df76dac66485d654cba7879386e695b3a9f9cb45
2 changes: 1 addition & 1 deletion module/default.nix
Original file line number Diff line number Diff line change
@@ -279,7 +279,7 @@ in {
builtins.concatStringsSep "\n"
(lib.mapAttrsToList (n: v: decryptCheckScript n v.source) cfg.file)
}
if [ ! -x $DECRYPTION ]; then
if [ -n "$DECRYPTION" ]; then
printf "''${errorColor}''${DECRYPTION}[homeage] Check homage.identityPaths to either add an identity or remove a broken one\n''${normalColor}" 1>&2
exit 1
fi