Compare commits

...

4 Commits

Author SHA1 Message Date
sternenseemann 9141d875c4
Merge 1746e4f5ec into 24a7ea3905 2024-04-26 15:44:21 +02:00
Ryan Mulligan 24a7ea3905
Merge pull request #256 from spectre256/main
fix: allow for newlines in keys
2024-04-26 05:59:12 -07:00
Ellis Gibbons 2c1d1fb134
fix: allow for newlines in keys 2024-04-12 17:50:07 -04:00
sternenseemann 1746e4f5ec agenix: fix installCheckPhase with Nix 2.3
As opposed to e.g. Nix 2.18, Nix 2.3 doesn't try to create a fallback
store in $HOME if $NIX_STORE_DIR and $NIX_STATE_DIR aren't writable.
2024-02-01 13:30:22 +01:00
2 changed files with 9 additions and 3 deletions

View File

@ -30,9 +30,13 @@ in
shellcheck ${bin}
${bin} -h | grep ${version}
HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
test_tmp=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
export HOME="$test_tmp/home"
export NIX_STORE_DIR="$test_tmp/nix/store"
export NIX_STATE_DIR="$test_tmp/nix/var"
mkdir -p "$HOME" "$NIX_STORE_DIR" "$NIX_STATE_DIR"
function cleanup {
rm -rf $HOME
rm -rf "$test_tmp"
}
trap "cleanup" 0 2 3 15

View File

@ -171,7 +171,9 @@ function edit {
ENCRYPT=()
while IFS= read -r key
do
ENCRYPT+=(--recipient "$key")
if [ -n "$key" ]; then
ENCRYPT+=(--recipient "$key")
fi
done <<< "$KEYS"
REENCRYPTED_DIR=$(@mktempBin@ -d)