You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/08/06 17:00:26 UTC

[GitHub] [hbase] taklwu commented on a change in pull request #3567: HBASE-26176 Correct regex in hbase-personality.sh

taklwu commented on a change in pull request #3567:
URL: https://github.com/apache/hbase/pull/3567#discussion_r684378930



##########
File path: dev-support/hbase-personality.sh
##########
@@ -148,7 +148,7 @@ function personality_modules
   # If we have HADOOP_PROFILE specified and we're on branch-2.x, pass along
   # the hadoop.profile system property. Ensures that Hadoop2 and Hadoop3
   # logic is not both activated within Maven.
-  if [[ -n "${HADOOP_PROFILE}" ]] && [[ "${PATCH_BRANCH}" =~ branch-2* ]] ; then
+  if [[ -n "${HADOOP_PROFILE}" ]] && [[ "${PATCH_BRANCH}" = branch-2* ]] ; then

Review comment:
       nit , LGTM 
   
   [not a blocker] although we have a very less likely chance we will have branch-2x (x is another digit) but the best maybe having the `branch\.*` to consider the dot.
   
   ```
   PATCH_BRANCH=branch-1.2; if [[ "${PATCH_BRANCH}" = branch-1* ]]; then echo "true"; else echo "false"; fi
   true
   PATCH_BRANCH=branch-12; if [[ "${PATCH_BRANCH}" = branch-1* ]]; then echo "true"; else echo "false"; fi
   true
   
   PATCH_BRANCH=branch-12; if [[ "${PATCH_BRANCH}" = branch-1\.* ]]; then echo "true"; else echo "false"; fi
   false
   PATCH_BRANCH=branch-1.2; if [[ "${PATCH_BRANCH}" = branch-1\.* ]]; then echo "true"; else echo "false"; fi
   true
   ```




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org