Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditional binary operator expected #9

Closed
vladkras opened this issue Jan 15, 2019 · 2 comments
Closed

conditional binary operator expected #9

vladkras opened this issue Jan 15, 2019 · 2 comments

Comments

@vladkras
Copy link
Contributor

I catch this error conditional binary operator expected on every line with

if [[ -v "VARNAME" ]] ...

consider using

if [[ ${VARNAME} ]] ...

instead. It seems -v was introduced in bash 4+ while macos still uses version 3

@byrnedo
Copy link
Owner

byrnedo commented May 15, 2019

ok, will fix
The reason I did this was due to having set -u.

vladkras added a commit to vladkras/docker-reg-tool that referenced this issue May 22, 2019
vladkras added a commit to vladkras/docker-reg-tool that referenced this issue May 22, 2019
@vladkras
Copy link
Contributor Author

@byrnedo, I replaced -v with ${...} and checked on bash v.3 to 5 (see #12)

Also I added Travis CI testing but I can exclude them from pull request #12 if you don't need'em at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants