[swift-users] ProcessInfo arguments when running as a script?
jordan_rose at apple.com
Thu Aug 18 22:05:39 CDT 2016
I’d be surprised if the behavior of ProcessInfo has actually changed. Swift.CommandLine (formerly Swift.Process, unrelated to ProcessInfo) should have the script arguments only.
> On Aug 18, 2016, at 19:14, Jon Shier via swift-users <swift-users at swift.org> wrote:
> Swift Users:
> I’m trying to parse the command-line arguments of a Swift 3 script using Xcode 8 beta 6. However, ProcessInfo’s arguments array now contains all of the swift compiler arguments as well as the command itself. For example, this script:
> #!/usr/bin/env swift
> import Foundation
> now prints:
> (arguments broken into lines for readability)
> Is this a bug (and if so, does it need to be reported) or is it an intentional change (if so, how are we supposed to parse arguments now?)?
> swift-users mailing list
> swift-users at swift.org
More information about the swift-users