mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-22 17:50:48 +03:00
Merge pull request #185 from Scrumplex/fix-shellcheck-warning
Disable shellcheck warning about impossible comparison
This commit is contained in:
commit
db5637d10f
2 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,7 @@ with lib; let
|
||||||
test "''${#IDENTITIES[@]}" -eq 0 && echo "[agenix] WARNING: no readable identities found!"
|
test "''${#IDENTITIES[@]}" -eq 0 && echo "[agenix] WARNING: no readable identities found!"
|
||||||
|
|
||||||
mkdir -p "$(dirname "$_truePath")"
|
mkdir -p "$(dirname "$_truePath")"
|
||||||
|
# shellcheck disable=SC2193
|
||||||
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && mkdir -p "$(dirname "${secretType.path}")"
|
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && mkdir -p "$(dirname "${secretType.path}")"
|
||||||
(
|
(
|
||||||
umask u=r,g=,o=
|
umask u=r,g=,o=
|
||||||
|
@ -59,6 +60,7 @@ with lib; let
|
||||||
mv -f "$TMP_FILE" "$_truePath"
|
mv -f "$TMP_FILE" "$_truePath"
|
||||||
|
|
||||||
${optionalString secretType.symlink ''
|
${optionalString secretType.symlink ''
|
||||||
|
# shellcheck disable=SC2193
|
||||||
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && ln -sfn "${cfg.secretsDir}/${secretType.name}" "${secretType.path}"
|
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && ln -sfn "${cfg.secretsDir}/${secretType.name}" "${secretType.path}"
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -59,6 +59,10 @@ pkgs.nixosTest {
|
||||||
# Only decryptable by user1's key
|
# Only decryptable by user1's key
|
||||||
file = ../example/secret2.age;
|
file = ../example/secret2.age;
|
||||||
};
|
};
|
||||||
|
secrets.secret2Path = {
|
||||||
|
file = ../example/secret2.age;
|
||||||
|
path = "/home/user1/secret2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue