From 9c92d6bcb6f78b740e541e507c5e8e68fc6b611e Mon Sep 17 00:00:00 2001
From: Igor Witz <igor.witz@etu.utc.fr>
Date: Mon, 13 May 2019 11:34:38 +0100
Subject: [PATCH] fix: retrieve FULL image name

---
 get-modified-image.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/get-modified-image.sh b/get-modified-image.sh
index 1ea81e45..7ad6f52e 100755
--- a/get-modified-image.sh
+++ b/get-modified-image.sh
@@ -10,6 +10,14 @@ do
 		*pica*) RES=$(echo $i | cut -d '/' -f1);;
 	esac
 done
+
+if [[ "$RES" == "" ]]
+then
+	echo "No image modified"
+	exit 1
+fi
+
+RES=$(cat $RES/docker-compose.yml | grep image: | head -n1 | cut -d ':' -f2-)
 if [[ "$RES" == "" ]]
 then
 	echo "No image modified"
@@ -17,5 +25,4 @@ then
 else
 	echo $RES
 fi
-RES=$(cat $RES/docker-compose.yml | grep image: | head -n1 | cut -d ':' -f2-)
 
-- 
GitLab