Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7067

bin/solr won't run under bash 4.2+

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.1, 6.0
    • Fix Version/s: 4.10.4, 5.0, 5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      I upgraded to OS X Yosemite 10.10.2 today, and the bash version went from 3.2.53(1)-release (x86_64-apple-darwin14) on 10.10.1 to 4.3.30(1)-release (x86_64-apple-darwin14.0.0).

      When I try to run bin/solr, I get:

      bin/solr: line 55: [: is: binary operator expected
      bin/solr: line 58: [: is: binary operator expected
      This script requires extracting a WAR file with either the jar or unzip utility, please install these utilities or contact your administrator for assistance.
      

      the relevant section of the script is:

      52: hasJar=$(which jar 2>/dev/null)
      53: hasUnzip=$(which unzip 2>/dev/null)
      54: 
      55: if [ ${hasJar} ]; then
      56:   unzipCommand="$hasJar xf"
      57: else
      58:   if [ ${hasUnzip} ]; then
      59:     unzipCommand="$hasUnzip"
      60:   else
      61:     echo -e "This script requires extracting a WAR file with either the jar or unzip utility, please install these utilities or contact your administrator for assistance."
      62:     exit 1
      63:   fi
      64: fi
      

        Attachments

        1. SOLR-7067.patch
          3 kB
          Steve Rowe
        2. SOLR-7067.patch
          2 kB
          Steve Rowe

          Activity

            People

            • Assignee:
              steve_rowe Steve Rowe
              Reporter:
              steve_rowe Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: