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:
7
.github/workflows/export_test.sh
vendored
7
.github/workflows/export_test.sh
vendored
@@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
set -e # Exit on any error
|
set -e # Exit on any error
|
||||||
|
|
||||||
# Get script directory
|
# Use current working directory (workflow already cd's to the test directory)
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
WORK_DIR="$(pwd)"
|
||||||
cd "$SCRIPT_DIR"
|
|
||||||
|
|
||||||
# Colors for output
|
# Colors for output
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
@@ -38,7 +37,7 @@ if [[ -z "$LLGO_ROOT" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_status "Starting export symbol name test..."
|
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"
|
print_status "LLGO_ROOT: $LLGO_ROOT"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user