-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[WIP] Fixing CLI-Handling #2749
Conversation
Stale pull request message |
I haven't tested these changes but they seem reasonable. Unfortunately I can't merge this. Can you rebase with master branch? |
Yes, I can rebase this later. But it would be really good if someone could take a closer look at this first, since it also disables proper checks of beef CLI arguments. As I described above, I unfortunately couldn't find an elegant way of handling this. |
Looks like this breaks the tests. Also, we don't care about the Sinatra options. They are supposed to be obscured. If users change these options they are in for a bad time. |
If we don't care about the Sinatra options then I should probably re-enable the CLI arg checks. This way they would be completely inaccessible. Just noting that this change is still relevant because currently users only see the Sinatra Options. |
Correct. The current behaviour is incorrect.
There are a lot of |
Yes, I can see that. But unfortunately not where they arise or why. It's weird to me since I thought I actually removed all calls to I reintroduced exiting on invalid options now, though. Sinatra options should now be hidden. |
@bcoles Can you trigger a rerun of the browser stack test? I would like to see whether my latest changes have changed anything with regards to it breaking |
@bcoles |
Stale pull request message |
(Starting with) fixing beef cli option handling. Fixes #2174
Note that this is WIP, I'm opening this to get some feedback on how this should be handled exactly.
Category
Core Functionality
Feature/Issue Description
Q: Please give a brief summary of your feature/fix
A: Beef options were not part of the
--help
before and not clearly communicated.Q: Give a technical rundown of what you have changed (if applicable)
A: The problem seems to pertain to Sinatra. Since some extensions use Sinatra, it is required from
loader.rb
(by requiring the bundle defaults). From then on, Sinatra basically hogs the command line parsing, parsing--help
and then exiting. A few key issues:Result
With these changes, we would at least see all the command line options being printed when running
./beef --help
, i.e.If anyone has a better idea on handling this, I'd be happy to hear and improve this. I hope I didn't miss anything too obvious :)