Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: |
src="dist/github-code-search-$(echo '${{ matrix.target }}' | sed 's/^bun-//')"
[ -f "${src}.exe" ] && src="${src}.exe"
mv -fv "$src" "dist/${{ matrix.artifact }}"
[ -f "dist/${{ matrix.artifact }}" ] || mv -v "$src" "dist/${{ matrix.artifact }}"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rename guard checks whether the destination file already exists, which can silently skip the move when the dest exists for reasons other than “src and dest are identical” (e.g., a leftover file), potentially uploading a stale artifact. Consider instead checking whether the computed src path equals the destination path and only skipping mv in that case; otherwise keep overwriting (mv -f) to ensure the artifact always matches the current build output.

Suggested change
[ -f "dist/${{ matrix.artifact }}" ] || mv -v "$src" "dist/${{ matrix.artifact }}"
dest="dist/${{ matrix.artifact }}"
if [ "$src" != "$dest" ]; then
mv -fv "$src" "$dest"
fi

Copilot uses AI. Check for mistakes.

- name: Upload artifact
uses: actions/upload-artifact@v6
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-code-search",
"version": "1.0.4",
"version": "1.0.5",
"description": "Interactive GitHub code search with per-repo aggregation",
"license": "MIT",
"author": "fulll",
Expand Down