mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
Windows CI Fix: Allow bash v4
Signed-off-by: John Howard <jhoward@microsoft.com> Upstream-commit: c07e79fa8adfaf8e110803c9d1ad2cf6cbc67ee9 Component: engine
This commit is contained in:
@@ -56,6 +56,13 @@ while [ $# -gt 0 ]; do
|
||||
layersFs=$(echo "$manifestJson" | jq --raw-output '.fsLayers | .[] | .blobSum')
|
||||
|
||||
IFS=$'\n'
|
||||
# bash v4 on Windows CI requires CRLF seperator
|
||||
if [ "$(go env GOHOSTOS)" = 'windows' ]; then
|
||||
major=$(echo ${BASH_VERSION%%[^0.9]} | cut -d. -f1)
|
||||
if [ "$major" -ge 4 ]; then
|
||||
IFS=$'\r\n'
|
||||
fi
|
||||
fi
|
||||
layers=( ${layersFs} )
|
||||
unset IFS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user