-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use SwiftCLI #29
Use SwiftCLI #29
Conversation
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.
This looks great @jakeheis, thank you! I'm totally happy using SwiftCLI
and removing 2 other dependencies.
_ = try capture("swift", arguments: ["package", "generate-xcodeproj"], directory: packagePath.string) | ||
} catch let error as CaptureError { | ||
stdout <<< error.captured.rawStdout | ||
stdout <<< error.captured.rawStderr |
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.
should this go to stderr?
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.
Fixed
_ = try capture("swift", arguments: ["build", "--disable-sandbox"], directory: packagePath.string) | ||
} catch let error as CaptureError { | ||
stdout <<< error.captured.rawStdout | ||
stdout <<< error.captured.rawStderr |
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.
should this be stderr?
🎉 |
This is a possible fix to #28. In most places I tried to make the fewest changes possible so that this PR wasn't too unwieldy. Most changes are relatively straight forward, but
FunctionParser.getParams
needed to be largely rewritten.Bugs fixed:
beak run
nil
is now a valid value for optional function parametersPublic API changed:
public func execute(arguments: [String]) throws
->public func execute(arguments: [String]? = nil) -> Int32
I'd also to like to re-emphasize that I am not trying to force
SwiftCLI
on this project in any way, this is just one solution to #28. If you decide to not useSwiftCLI
I'd be happy to open a new PR which fixes the SIGINT problem withSwiftShell
!