From d3b5a1fd934100aae7c504bdd48b719b15cafef7 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 13 Sep 2019 22:56:01 +0300
Subject: [PATCH] Only install Vagrant plugin if the plugin is missing.

---
 .githooks/post-merge | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.githooks/post-merge b/.githooks/post-merge
index fdaba7c..2d875cf 100755
--- a/.githooks/post-merge
+++ b/.githooks/post-merge
@@ -26,6 +26,8 @@ Documents/bin/cron-jobs
 if command -v vagrant > /dev/null
 then
 	echo Installing Vagrant plugins >> /dev/stderr
-	vagrant plugin install landrush || true
-	vagrant plugin install vagrant-gatling-rsync || true
+    for plugin in landrush vagrant-gatling-rsync
+    do
+        vagrant plugin list | grep -qw "$plugin" || vagrant plugin install "$plugin" || true
+    done
 fi
-- 
GitLab