Skip to content

Fix generated pack index URL to reference output directory - #253

Merged
edriouk merged 1 commit into
mainfrom
fix/835
Sep 14, 2026
Merged

edriouk merged 1 commit into
mainfrom
fix/835

Conversation

@edriouk

@edriouk edriouk commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Fixes

Changes

  • Generate the pack index URL from the output file’s directory instead of including the output filename.
  • Normalize the file URL with a trailing slash while preserving the root file:/// URL.
  • Update CLI and PidxXML.Update tests to verify the corrected URL format across platforms.

Risk / Limitations

  • Low risk; the change is limited to generated pack index URL metadata. Consumers relying on the previous filename-inclusive URL will receive the corrected directory URL.

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (not necessary; covered by unit tests).
  • 🛡️ Security impacts have been considered (no impact).
  • 📖 Documentation updates are complete (not required).
  • 🧠 Third-party dependencies and TPIP updated (not required).

Ensure file URLs omit the output filename and always end with a slash.
Update CLI and PIDX tests to cover the corrected URL format.
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@qltysh

qltysh Bot commented Sep 14, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
cmd/pidx.go100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@brondani
brondani requested a lite review from Copilot September 14, 2026 15:13
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 2 files  ±0   2 suites  ±0   0s ⏱️ ±0s
45 tests ±0  45 ✅ ±0  0 💤 ±0  0 ❌ ±0 
90 runs  ±0  90 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 9309687. ± Comparison against base commit 86f3c25.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The URL fix and corresponding tests are complete with no unresolved issues.

Pull request overview

Fixes generated pack index URLs to reference the output directory with normalized file URL formatting.

Changes:

  • Generate URLs from the output directory.
  • Preserve file:/// for filesystem roots.
  • Update platform-specific CLI and update tests.
File summaries
File Description
cmd/pidx.go Corrects generated directory-based file URLs.
cmd/pidx_test.go Verifies directory URLs across platforms.
cmd/cli_test.go Updates CLI output expectations.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@edriouk
edriouk requested a review from brondani September 14, 2026 15:17
@edriouk
edriouk marked this pull request as ready for review September 14, 2026 15:19

@brondani brondani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@edriouk
edriouk merged commit 7975365 into main Sep 14, 2026
21 checks passed
@edriouk
edriouk deleted the fix/835 branch September 14, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: cpackget add crashes when updating a filesystem hosted .Web/index.pidx generated by vidx2pidx

3 participants