Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14628

Wildfly 23 jboss-cli.sh script can't be interpreted by sh

    XMLWordPrintable

Details

    • Undefined

    Description

      In the WF version 23 there was a change in jboss-cli.sh script on line 89 that leads to the error during the execution:

      $ ./wildfly-23.0.0.Final/bin/jboss-cli.sh 
      ./wildfly-23.0.0.Final/bin/jboss-cli.sh: 89: Syntax error: "(" unexpected
      

      The sh shell hasn't syntax to create arrays and this particular code is not working in sh:

       # WFCORE-5241 convert $JAVA_OPTS into array and quote each element to allow exec them with whitespace inside.
       89 java_opts_array=()
       90 eval 'for arg in '$JAVA_OPTS'; do java_opts_array+=("$arg"); done' 

      Actual behavior:

      there is an error during script execution

      Expected behavior:

      Script is working

      Additional details

      Please ** consider an option to not change the interpreter to bash because lots of slim Linux distros don't have this package installed.

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              kiberxx@yandex.ru Ivan Ivanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: