You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2022/05/04 14:46:05 UTC

[yetus] branch main updated: YETUS-1175. buf output not showing up in results-full (#274)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 0906bb56 YETUS-1175. buf output not showing up in results-full (#274)
0906bb56 is described below

commit 0906bb569099922ca74e6d5ee57bc34b1736060f
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Wed May 4 07:45:59 2022 -0700

    YETUS-1175. buf output not showing up in results-full (#274)
    
    Signed-off-by: Nick Dimiduk <nd...@apache.org>
---
 precommit/src/main/shell/plugins.d/buf.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/precommit/src/main/shell/plugins.d/buf.sh b/precommit/src/main/shell/plugins.d/buf.sh
index 67c01771..f0a3dad6 100755
--- a/precommit/src/main/shell/plugins.d/buf.sh
+++ b/precommit/src/main/shell/plugins.d/buf.sh
@@ -55,8 +55,12 @@ function buf_parse_args
 
   if [[ -n "${BUF_BASEDIR}" ]]; then
     # make sure this is relative and strip any ending /
-    BUF_BASEDIR=$(yetus_abs "${BUF_BASEDIR}")
-    BUF_BASEDIR=$(yetus_relative_dir "${BASEDIR}" "${BUF_BASEDIR}")
+    if [[ -e "${BASEDIR}/${BUF_BASEDIR}" ]]; then
+      BUF_BASEDIR=$(yetus_relative_dir "${BASEDIR}" "${BASEDIR}/${BUF_BASEDIR}")
+    else
+      BUF_BASEDIR=$(yetus_abs "${BUF_BASEDIR}")
+      BUF_BASEDIR=$(yetus_relative_dir "${BASEDIR}" "${BUF_BASEDIR}")
+    fi
   fi
 
   # forcibly setting return 0 because otherwise