Skip to content

Conversation

lewisfm
Copy link

@lewisfm lewisfm commented Jun 18, 2025

This pull request updates the handling of subcommands in the Swift Driver to ensure correct behavior when the subcommand executable is not adjacent to swift-driver itself. Now, if the adjacent binary doesn't exist, the driver will fall back to a $PATH-based search rather than attempting to run the missing executable (this seems to be the intended behavior based on the comment above this code).

I also expanded the error message for the failure case here.

This change is important because allows users to use subcommands that didn't come bundled with Swift.

Fixes #1932

@artemcm
Copy link
Contributor

artemcm commented Jun 18, 2025

@swift-ci test

@lewisfm
Copy link
Author

lewisfm commented Jun 20, 2025

The error message for Windows seems to be about Predicate's string formatting, but I didn't change code related to that. Is there anything I need to do here to resolve the CI error? This is my first time contributing to Swift, so I don't really know the procedure.

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.

Always fall back to $PATH-based subcommand resolution
2 participants