Skip to content

Commit

Permalink
preventing potential octal interpretation of minor version number
Browse files Browse the repository at this point in the history
  • Loading branch information
EJ Etherington committed Jul 25, 2017
1 parent 780f1e1 commit 8bf0ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/docker-push
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ version=$(docker version | grep -e Version | head -n 1 | awk '{ print $2 }')
major=$(echo "${version}" | awk -F. '{ print $1 }')
minor=$(echo "${version}" | awk -F. '{ print $2 }')

if [[ "${minor}" -le 9 && "${major}" -eq 1 ]] || [ "${major}" -eq 0 ]
if [[ "${minor#0}" -le 9 && "${major}" -eq 1 ]] || [ "${major}" -eq 0 ]
then
DOCKER_TAG_COM="${DOCKER_TAG_COM} -f "
fi
Expand Down

0 comments on commit 8bf0ed2

Please sign in to comment.