Skip to content

Commit 37d8054

Browse files
committed
Review fixes
Signed-off-by: AkramBitar <akram@il.ibm.com>
1 parent 53d4470 commit 37d8054

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

tools/profiler/go.mod

Lines changed: 0 additions & 7 deletions
This file was deleted.

tools/profiler/profile.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,24 @@ if [[ $? -ne 0 ]]; then
145145
fi
146146
echo -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}"
150150
cd "$TEMP_TEST_DIR"
151+
152+
# Create a temporary go.mod for the tracer package (needed for replace directive)
151153
TEMP_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
152161
go 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
155166
echo -e "${GREEN}Tracer configured${NC}"
156167

157168
# Cleanup function

tools/profiler/tracer/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)