-
Notifications
You must be signed in to change notification settings - Fork 9
Add ConfigurationBuilder for custom command configurations #41
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?
Conversation
Create the missing run method that takes a Configuration and returns a CollectedResult
…ocess into config_builder
Fix compile errors Fix Configuration test
|
Could you elaborate more on what's the benefit of this approach over declaring extension Configuration {
static var ls: Self {
return Configuration(
executable: .path("/bin/ls"),
...
)
}
}The |
I'm not seeing how this var can build a command-line with the arguments provided at the call-site. How do I provide a specific directory "foo" with this approach and specify the long option? With an Ls struct that conforms to the CommandBuilder protocol then I can do it like this: |
…ocess into config_builder # Conflicts: # Sources/Subprocess/API.swift
…config_builder
…config_builder
…in the API signatures
See issue #36 for an additional example.