eliu / openshift-vagrant

Bring up a real OKD cluster on your local machine using Vagrant and VirtualBox
Apache License 2.0
57 stars 56 forks source link

Update common.sh #9

Closed chris-str-cst closed 5 years ago

chris-str-cst commented 5 years ago

Fixed (octal interpretation (leading zero)) in master.sh

chris-str-cst commented 5 years ago

Without that fix I got: [[: 003009: value too great for base (error token is "003009") on master.sh:36+45

eliu commented 5 years ago

There's no error on my side. which bash version did you use to run this script? My Mac's bash current version is 3.2.57.

Anyways, your version still works for me unless redhat does not increment their openshift major version greater than 9.

chris-str-cst commented 5 years ago

➜ ~ bash -version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)

Hmm, what is then the difference. Do you got settings globally which changes this behavior?

eliu commented 5 years ago

the same version ... well, what i've found is the differences between [[ and [, check this out:

eliuhy@rmbp:tmp $ [ "$(version ${OPENSHIFT_RELEASE})" -gt "$(version 3.7)" ]
eliuhy@rmbp:tmp $ [[ "$(version ${OPENSHIFT_RELEASE})" -gt "$(version 3.7)" ]]
bash: [[: 003009: value too great for base (error token is "003009")
eliuhy@rmbp:tmp $

And yes, this is can be reproduced. solution will be either yours or replace [[ with [. I'll choose to apply your patch. thanks for contributions.