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 #4

Open
bickerstoff opened this issue Feb 18, 2014 · 3 comments
Open

conditional binary operator expected #4

bickerstoff opened this issue Feb 18, 2014 · 3 comments

Comments

@bickerstoff
Copy link

Issue

When executing ./redmine.sh, I'm getting the following error:

./redmine.sh: line 14: conditional binary operator expected
./redmine.sh: line 14: syntax error near `RAILS_ENV'
./redmine.sh: line 14: `if [[ ! -v RAILS_ENV || "$RAILS_ENV" == development ]]; then'

Details

CentOS 6.5
Docker client 0.7.6
root user

git clone git://github.com/binaryphile/docker-redmine
cd docker-redmine
./redmine.sh
@binaryphile
Copy link
Owner

Just tried it again on my machine and it works. It's probably due to a differing version of bash on CentOS, or perhaps a different install location for bash. Try changing the initial line of the redmine.sh script to use /usr/bin/env instead of the bash path.

@jauyzed
Copy link

jauyzed commented Sep 15, 2016

Im trying this on mac i see the above error listed.

other bash scripts run fine which has #!/bin/bash. Not sure why this might be complaining?

@binaryphile
Copy link
Owner

It's the -v test for the variable definition. Your bash is probably older than 4.2. Homebrew must have a more recent version available if you check, I'm sure.

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

3 participants