From 6c85cf7594e4bc9bd94cfa443413c8e59e879055 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Fri, 31 Oct 2025 06:52:39 +0000 Subject: [PATCH] fix: export test script should use current working directory The script was changing to its own directory (.github/workflows) instead of using the current directory where the workflow already placed it (_demo/embed/export). This caused the script to look for go.mod in the wrong location. Fixed by using pwd instead of changing to the script's directory. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com> --- .github/workflows/export_test.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/export_test.sh b/.github/workflows/export_test.sh index 0a132931..4edb87ff 100755 --- a/.github/workflows/export_test.sh +++ b/.github/workflows/export_test.sh @@ -6,9 +6,8 @@ set -e # Exit on any error -# Get script directory -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "$SCRIPT_DIR" +# Use current working directory (workflow already cd's to the test directory) +WORK_DIR="$(pwd)" # Colors for output RED='\033[0;31m' @@ -38,7 +37,7 @@ if [[ -z "$LLGO_ROOT" ]]; then fi print_status "Starting export symbol name test..." -print_status "Working directory: $SCRIPT_DIR" +print_status "Working directory: $WORK_DIR" print_status "LLGO_ROOT: $LLGO_ROOT" echo ""