docker-redmine icon indicating copy to clipboard operation
docker-redmine copied to clipboard

conditional binary operator expected

Open bickerstoff opened this issue 11 years ago • 3 comments

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

bickerstoff avatar Feb 18 '14 21:02 bickerstoff

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.

binaryphile avatar Feb 25 '14 18:02 binaryphile

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?

jauyzed avatar Sep 15 '16 20:09 jauyzed

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.

binaryphile avatar Sep 16 '16 20:09 binaryphile