Fix config file lookup when project path contains spaces#154
Merged
BarredEwe merged 3 commits intoBarredEwe:mainfrom Feb 4, 2026
Merged
Fix config file lookup when project path contains spaces#154BarredEwe merged 3 commits intoBarredEwe:mainfrom
BarredEwe merged 3 commits intoBarredEwe:mainfrom
Conversation
Owner
|
Hey! Thanks for the quick fix - this solves the spaces-in-path issue nicely, and the test is a great touch. 👍 Looks good to me. Let’s merge it as-is. |
BarredEwe
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description 📝
Fixes an issue where the
.prefire.ymlconfig file is not found when the project path contains spaces. The plugin passes percent-encoded paths (e.g.,My%20Project) which causes the file lookup to fail.Solution 📦
Decode percent-encoded characters in
ConfigPathBuilder.possibleConfigPaths()before constructing the URL:The root cause is that the plugin uses
String(describing: target.directory)which percent-encodes spaces. Alternative fixes were considered:Change plugin to use
target.directory.string— This fixes the encoding but reintroduces deprecation warnings that were removed in Removing swift 5.x support and fixing warnings #101.Change plugin to use
target.directoryURL.path(percentEncoded: false)— This is the ideal solution butdirectoryURLis only available in swift-tools-version 6.1+, and the package currently targets 6.0.Decode in the executable (this PR) — A defensive fix that handles percent-encoded input regardless of source, requires no plugin changes, and introduces no warnings. This complements the fixes in Fixed issue where config paths containing spaces #141.
Implementation 👩💻👨💻
removingPercentEncodingcall inConfigPathBuilder.possibleConfigPaths()before creating URL from input pathCloses #153