ndimiduk commented on a change in pull request #86: YETUS-934. Precommit does 
not accept a caller's value of MAVEN_ARGS
URL: https://github.com/apache/yetus/pull/86#discussion_r376032958
 
 

 ##########
 File path: precommit/src/main/shell/test-patch.d/maven.sh
 ##########
 @@ -14,7 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-declare -a MAVEN_ARGS
+# Accept a value of MAVEN_ARGS from the calling context
+# shellcheck disable=SC2206
 
 Review comment:
   Shellcheck tells me that I need to quote everything inside the parentheses, 
but I want `MAVEN_ARGS` to be interpreted as an array. If I quote it, it 
doesn't do the splitting I'm after.
   
   ```sh
   $ x='hello there'
   $ unset y
   $ declare -a FOO=(${x:-})
   $ set | grep FOO
   FOO=([0]="hello" [1]="there")
   _=FOO
   $ declare -a FOO=("${x:-}")
   $ set | grep FOO
   FOO=([0]="hello there")
   _=FOO
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to