Browse code

Windows CI Fix: Allow bash v4

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2015/12/07 07:37:07
Showing 1 changed files
... ...
@@ -56,6 +56,13 @@ while [ $# -gt 0 ]; do
56 56
 	layersFs=$(echo "$manifestJson" | jq --raw-output '.fsLayers | .[] | .blobSum')
57 57
 
58 58
 	IFS=$'\n'
59
+	# bash v4 on Windows CI requires CRLF seperator
60
+	if [ "$(go env GOHOSTOS)" = 'windows' ]; then
61
+		major=$(echo ${BASH_VERSION%%[^0.9]} | cut -d. -f1)
62
+		if [ "$major" -ge 4 ]; then
63
+			IFS=$'\r\n'
64
+		fi
65
+	fi	
59 66
 	layers=( ${layersFs} )
60 67
 	unset IFS
61 68