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>
This commit is contained in:
xgopilot
2025-10-31 06:52:39 +00:00
parent f3e5ad536d
commit 6c85cf7594

View File

@@ -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 ""