summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-01-17 16:19:41 +0100
committerlassulus <lassulus@lassul.us>2021-01-17 17:18:05 +0100
commit9eb2c2d0d6199345d857b9bb9d8c6185434f6f87 (patch)
treea81424a0f4e47c0c7cb80debcfd66be5b0997d47 /pkgs
parentc2fa48550f2bb46009b9cecdb9ac838dc402ce19 (diff)
populate pass: make git optional againgit_optional
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/populate/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix
index 476e653..589362d 100644
--- a/pkgs/populate/default.nix
+++ b/pkgs/populate/default.nix
@@ -126,14 +126,18 @@ let
rel_name=''${rel_name%.gpg}
pass_date=$(
- ${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path"
+ if test -e ${quote source.dir}/.git; then
+ ${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path"
+ fi
)
pass_name=${quote source.name}/$rel_name
tmp_path=$tmp_dir/$rel_name
${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")"
PASSWORD_STORE_DIR=${quote source.dir} ${pass}/bin/pass show "$pass_name" > "$tmp_path"
- ${coreutils}/bin/touch -d "$pass_date" "$tmp_path"
+ if [ -n "$pass_date" ]; then
+ ${coreutils}/bin/touch -d "$pass_date" "$tmp_path"
+ fi
done
if test -n "''${local_pass_info-}"; then