File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -145,13 +145,24 @@ if [[ $? -ne 0 ]]; then
145145fi
146146echo -e " ${GREEN} Tracer injected${NC} "
147147
148- # Add tracer module
149- echo -e " ${BLUE} Configuring tracer module ...${NC} "
148+ # Ensure tracer package is available in the temporary workspace
149+ echo -e " ${BLUE} Configuring tracer access ...${NC} "
150150cd " $TEMP_TEST_DIR "
151+
152+ # Create a temporary go.mod for the tracer package (needed for replace directive)
151153TEMP_TRACER_DIR=" $WORK_DIR /tools/profiler/tracer"
154+ cat > " $TEMP_TRACER_DIR /go.mod" << EOF
155+ module github.com/hyperledger-labs/fabric-token-sdk/tools/profiler/tracer
156+
157+ go 1.24
158+ EOF
159+
160+ # Add replace directive to point to the tracer in the temp workspace
152161go mod edit -replace github.com/hyperledger-labs/fabric-token-sdk/tools/profiler/tracer=" $TEMP_TRACER_DIR "
153- go mod edit -require github.com/hyperledger-labs/fabric-token-sdk/tools/profiler/tracer@v0.0.0
154- go mod tidy > /dev/null 2>&1
162+ if ! go mod tidy 2>&1 ; then
163+ echo -e " ${RED} Error: go mod tidy failed${NC} "
164+ exit 1
165+ fi
155166echo -e " ${GREEN} Tracer configured${NC} "
156167
157168# Cleanup function
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments