-
Notifications
You must be signed in to change notification settings - Fork 70
🐛fix: normalize file paths for cross-platform compatibility #917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
🐛fix: normalize file paths for cross-platform compatibility #917
Conversation
Signed-off-by: JANHVI BABANI <114232474+Janhvibabani@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellar-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request. Before your PR can be merged, please ensure: ✅ DCO Sign-off - All commits must be signed off with ✅ PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), Getting Started with KubeStellar: Contributor Resources:
🌟 Help KubeStellar Grow - We Need Adopters! Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes: 📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction! A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack! |
|
Hi @Janhvibabani. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this 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 Windows-style backslashes in file paths caused build failures due to path mismatch during _meta validation. The fix normalizes all collected file paths to use forward slashes, ensuring consistent behavior across Windows, Linux, and macOS.
Changes:
- Normalized
relativePathto use forward slashes in thegetAllDocFilesfunction by replacing backslashes with forward slashes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } else if (entry.isFile() && (entry.name.endsWith('.md') || entry.name.endsWith('.mdx'))) { | ||
| files.push(relativePath) | ||
| files.push(relativePath.replace(/\\/g, '/')) |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider documenting this cross-platform path normalization with a brief inline comment. While the fix correctly addresses the Windows path separator issue described in issue #914, a comment would help future maintainers understand why this normalization is necessary. For example: "// Normalize to forward slashes for cross-platform consistency"
| files.push(relativePath.replace(/\\/g, '/')) | |
| files.push(relativePath.replace(/\\/g, '/')) // Normalize to forward slashes for cross-platform consistency |
|
cc @oksaumya |
📌 Fixes
Fixes #914
📝 Summary of Changes
This PR normalizes collected file paths to use forward slashes (
/) to ensureconsistent, cross-platform behavior across Windows, Linux, and macOS.
Previously, Windows-style backslashes (
\) could lead to inconsistent pageresolution and OS-specific build behavior.
Changes Made
relativePathto use forward slashes before pushing it to thecollected files list
_meta.jsonpage resolution during buildChecklist
Please ensure the following before submitting your PR:
Screenshots or Logs (if applicable)
👀 Reviewer Notes
Add any special notes for the reviewer here