Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

On Windows, filepath.Walk returns paths with backslashes (e.g., .agent\skills\test.txt), but gitignore pattern matching expects forward slashes. This caused .zeaburignore and .gitignore patterns to fail on Windows.

Changes:

  • Normalize path separators to forward slashes with filepath.ToSlash() before matching against gitignore patterns in internal/util/pack.go
  • Apply normalization before appending trailing slash for directory matching
// Before: Windows paths with backslashes failed to match
checkPath := path  // ".agent\skills\test.txt" on Windows

// After: Normalized to forward slashes for cross-platform matching
checkPath := filepath.ToSlash(path)  // ".agent/skills/test.txt"
if info.IsDir() {
    checkPath = checkPath + "/"
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pan93412 <28441561+pan93412@users.noreply.github.com>
Copilot AI changed the title [WIP] Add .zeaburignore support for deployment filtering Jan 28, 2026
Copilot AI requested a review from pan93412 January 28, 2026 14:21
@pan93412 pan93412 marked this pull request as ready for review January 28, 2026 14:38
Copilot AI review requested due to automatic review settings January 28, 2026 14:38
@pan93412 pan93412 merged commit bf32eb5 into pan93412/zea-8670-add-zeaburignore-ignore-flag-to-deploy-command Jan 28, 2026
2 checks passed
@pan93412 pan93412 deleted the copilot/sub-pr-162 branch January 28, 2026 14:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a cross-platform compatibility issue where gitignore pattern matching failed on Windows due to path separator differences. The fix ensures that .zeaburignore and .gitignore patterns work correctly on Windows by normalizing backslashes to forward slashes before pattern matching.

Changes:

  • Normalize path separators to forward slashes using filepath.ToSlash() before gitignore pattern matching in internal/util/pack.go

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants