Skip to content

Commit 573e079

Browse files
authored
Update temporary file path in semantic analysis workflow
1 parent 0b60034 commit 573e079

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/semantic_analysis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ jobs:
7474
git diff --name-only -z "$BASE_SHA" HEAD -- '*.go' | while IFS= read -r -d '' file; do
7575
if [ ! -f "$file" ]; then continue; fi
7676
77-
TEMP_OLD="old_temp.go"
77+
# Use /tmp to avoid Go package conflicts with workspace files
78+
TEMP_OLD="/tmp/old_temp.go"
7879
git show "$BASE_SHA:$file" > "$TEMP_OLD" 2>/dev/null || touch "$TEMP_OLD"
7980
8081
if ! OUTPUT=$(sfw diff "$TEMP_OLD" "$file" 2>&1); then
8182
echo "::error::sfw failed on $file: $OUTPUT"
82-
rm "$TEMP_OLD"; continue
83+
rm -f "$TEMP_OLD"; continue
8384
fi
84-
rm "$TEMP_OLD"
85+
rm -f "$TEMP_OLD"
8586
8687
# Validate JSON
8788
if ! echo "$OUTPUT" | jq -e . >/dev/null 2>&1; then
@@ -118,4 +119,4 @@ jobs:
118119
echo " **CI FAILED**: Logic changed in 'semantic-safe' PR." >> $GITHUB_STEP_SUMMARY
119120
exit 1
120121
fi
121-
exit 0
122+
exit 0

0 commit comments

Comments
 (0)