Skip to content

Conversation

@gabtorre
Copy link
Contributor

@gabtorre gabtorre commented Dec 19, 2024

The original snippet has some issues:
The loop will not handle spaces correctly and may misinterpret the path.
The entire string is treated as one entity due to the quotes, leading to incorrect processing.

Updated the loop handling in the script to correctly process file paths by switching from space-delimited to newline-delimited entries. This ensures the handling of paths with spaces or special characters. Added IFS=$'\n' for proper splitting and quoting of paths in the loop for safety.

Screenshot 2024-12-19 at 3 10 35 PM
Spaces in file names
Screenshot 2024-12-19 at 3 09 23 PM

Pull Request approval

You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.

@vercel
Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:57pm

@enriquegh enriquegh self-requested a review December 20, 2024 04:37
@gabtorre gabtorre merged commit 94e73e5 into main Dec 20, 2024
7 checks passed
@gabtorre gabtorre deleted the gabtorre-patch-1 branch December 20, 2024 19:33
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.

3 participants