You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by GitBox <gi...@apache.org> on 2020/02/06 19:22:18 UTC

[GitHub] [yetus] ndimiduk commented on a change in pull request #86: YETUS-934. Precommit does not accept a caller's value of MAVEN_ARGS

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:
users@infra.apache.org


With regards,
Apache Git Services