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

tests: Use Parser to parse args #3976

Merged
merged 1 commit into from Mar 25, 2018
Merged

Conversation

GauthamGoli
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

#1860

This is a backwards incompatible change for --seed

@MikeMcQuaid
Copy link
Member

This is a backwards incompatible change for --seed

@GauthamGoli We'll need to support the --key=value format for some other commands. Why is it not posssible for --seed but is for --only?

@GauthamGoli
Copy link
Contributor Author

@MikeMcQuaid --seed was of --key value format, now it is of --key=value format

@MikeMcQuaid
Copy link
Member

@GauthamGoli Ah, gotcha, yes, misread! Thanks again!

@MikeMcQuaid MikeMcQuaid merged commit ceed7a6 into Homebrew:master Mar 25, 2018
@ilovezfs
Copy link
Contributor

It would be nice if, in general, --key val and --key=val both worked for Homebrew commands. I think it's a common error for people to

brew bump-formula-pr --url https://github.com/macvim-dev/macvim/archive/snapshot-146.tar.gz --version=8.0-146 macvim

when they mean

brew bump-formula-pr --url=https://github.com/macvim-dev/macvim/archive/snapshot-146.tar.gz --version=8.0-146 macvim

and the error message is about as strange as you could imagine

Josephs-MacBook-Pro:Formula joe$ brew bump-formula-pr --url https://github.com/macvim-dev/macvim/archive/snapshot-146.tar.gz --version=8.0-146 macvim
##################################################################################################################################################################################################### 100.0%
Error: snapshot-146.tar.gz: /Users/joe/Library/Caches/Homebrew/Formula/snapshot-146.tar.gz:1: Invalid char `\x1F' in expression
/Users/joe/Library/Caches/Homebrew/Formula/snapshot-146.tar.gz:1: invalid multibyte char (UTF-8)
Josephs-MacBook-Pro:Formula joe$ 

@GauthamGoli
Copy link
Contributor Author

@ilovezfs Actually, OptionParser supports both, so both ways would work for Homebrew and I was wrong in saying this is a backwards incompatible change

@GauthamGoli
Copy link
Contributor Author

And no more weird errors once I add Parser support in bump-formula-pr 👍

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants