This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new bab49a0  YETUS-963. prototool-basedir should be a cwd (#107)
bab49a0 is described below

commit bab49a054acada97618d02010ddf941335bd9897
Author: Allen Wittenauer <[email protected]>
AuthorDate: Mon Apr 13 08:49:02 2020 -0700

    YETUS-963. prototool-basedir should be a cwd (#107)
---
 precommit/src/main/shell/test-patch.d/prototool.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/precommit/src/main/shell/test-patch.d/prototool.sh 
b/precommit/src/main/shell/test-patch.d/prototool.sh
index 2b5f839..cfa6fed 100755
--- a/precommit/src/main/shell/test-patch.d/prototool.sh
+++ b/precommit/src/main/shell/test-patch.d/prototool.sh
@@ -25,7 +25,7 @@ PROTOTOOL=${PROTOTOOL:-$(command -v prototool 2>/dev/null)}
 function prototool_usage
 {
   yetus_add_option "--prototool=<path>" "path to prototool executable 
(default: ${PROTOTOOL})"
-  yetus_add_option "--prototool-dir=<path>" "set the starting dir to run 
prototool"
+  yetus_add_option "--prototool-basedir=<path>" "set the starting dir to run 
prototool"
   yetus_add_option "--prototool-walktimeout=<###u>" "set prototool walktimeout 
value"
 
 }
@@ -102,13 +102,12 @@ function prototool_executor
     protoargs+=(--walk-timeout "${PROTOTOOL_WALKTIMEOUT}")
   fi
 
-  ## MUST ALWAYS BE LAST!
   if [[ -n "${PROTOTOOL_BASEDIR}" ]]; then
-    protoargs+=("${PROTOTOOL_BASEDIR}")
+    pushd "${BASEDIR}/${PROTOTOOL_BASEDIR}" >/dev/null || return 1
+  else
+    pushd "${BASEDIR}" >/dev/null || return 1
   fi
 
-  pushd "${BASEDIR}" >/dev/null || return 1
-
   "${PROTOTOOL}" lint  "${protoargs[@]}" 2> "${PATCH_DIR}/${prototoolStderr}" 
| \
     "${args[@]}" > "${PATCH_DIR}/${repostatus}-prototool-result.txt"
   popd >/dev/null || return 1

Reply via email to