summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-11-15 09:49:49 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-11-15 09:49:49 +0100
commit730baaa4fed5a013ed0744137389cfeaa643886e (patch)
tree788a026a5cc04fde045232939073c0af3cd27beb
parentfdcc0dbadadddddaaf2bf6b63f706dd2b6d95db3 (diff)
downloadnixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar
nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.gz
nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.bz2
nixos-730baaa4fed5a013ed0744137389cfeaa643886e.tar.xz
nixos-730baaa4fed5a013ed0744137389cfeaa643886e.zip
(Hopefully) better check for inifinoted git sync
-rw-r--r--ymir.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/ymir.nix b/ymir.nix
index 84e71119..5d77ecef 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -896,8 +896,10 @@ in rec {
896 hook=${pkgs.writeScript "git-sync.sh" '' 896 hook=${pkgs.writeScript "git-sync.sh" ''
897 #!${pkgs.zsh}/bin/zsh 897 #!${pkgs.zsh}/bin/zsh
898 898
899 git -C ''${2:h} rev-parse --is-inside-work-tree || exit 0
900
899 repository=$(git -C ''${2:h} rev-parse --show-toplevel) 901 repository=$(git -C ''${2:h} rev-parse --show-toplevel)
900 [[ $? -eq 0 ]] || exit 0 902 [[ $? -ne 0 ]] && exit $?
901 903
902 git() { 904 git() {
903 $(whence -cp git) -C ''${repository} ''${@} 905 $(whence -cp git) -C ''${repository} ''${@}