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

Can't specify --test-arguments more than once #2226

Closed
cblp opened this issue Jun 1, 2016 · 4 comments
Closed

Can't specify --test-arguments more than once #2226

cblp opened this issue Jun 1, 2016 · 4 comments

Comments

@cblp
Copy link
Contributor

cblp commented Jun 1, 2016

$ stack test --test-arguments "a b" --test-arguments "c d"
Invalid option `--test-arguments'

stack=1.1.2

expected: testArguments == ["a", "b", "c", "d"]

@mgsloan
Copy link
Contributor

mgsloan commented Jun 1, 2016

I'm not opposed to this, but what's the intended usecase? I can also see value in the reset semantics and this would be a behavior change.

We'd also need to revisit other similar flags and change their behavior for consistency with this one. For example, the flags for invoked programs - #652

@cblp
Copy link
Contributor Author

cblp commented Jun 2, 2016

Intended usecase:

  1. Write a script with persistent arguments

    # ./test.sh
    stack test --test-arguments="--report --verbose" "$@"
    
  2. Invoke it with ad hoc arguments

    ./test.sh --test-arguments="--parallel --filter=abc"
    

@mgsloan
Copy link
Contributor

mgsloan commented Jun 2, 2016

Makes sense! I think the resolution of this ticket should be that all command-argument like options have this combining semantics.

@snoyberg
Copy link
Contributor

See #4748

snoyberg added a commit that referenced this issue Apr 16, 2019
…guments

Allow multiple --test-arguments to be passed (fixes #2226)
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

3 participants