Skip to content

Commit

Permalink
fix: add --strict nix-instantiate to support builtins.readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
WillPower3309 committed Sep 22, 2023
1 parent 7f9dfa3 commit 115e561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/agenix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function cleanup {
trap "cleanup" 0 2 3 15

function keys {
(@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in rules.\"$FILE\".publicKeys)" | @jqBin@ -r .[]) || exit 1
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$FILE\".publicKeys)" | @jqBin@ -r .[]) || exit 1
}

function decrypt {
Expand Down

2 comments on commit 115e561

@thongpv87
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillPower3309 did you miss this

FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)

@WillPower3309
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillPower3309 did you miss this

FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)

I did forget, although my rekey still works fine... 🤔 @ryantm what are your thoughts here? I can make a PR adding the --strict flag to the rekey function too? Not sure why it works fine without it there

Please sign in to comment.