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

feat: Improve error message to know where to place --verbose option #1865

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

apupier
Copy link
Contributor

@apupier apupier commented Nov 15, 2024

fixes #1864

fixes jbangdev#1864

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
@apupier apupier marked this pull request as ready for review November 15, 2024 14:40
@@ -467,7 +467,7 @@ static public void errorMsg(String msg, Throwable e) {
if (msg != null) {
infoMsg(e.getMessage());
}
infoMsg("Run with --verbose for more details");
infoMsg("Run with --verbose for more details. The --verbose must be placed before the jbang command. I.e. jbang --verbose run [...]");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it always before the jbang command or it can also be placed after the jbang command as a parameter of it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be placed anywhere before the source or GAV or alias. Since anything after that gets used as argument to the launched app.

These are equal:

jbang --verbose app.java
jbang run --verbose app.java
jbang --verbose app.java

but here --verbose is passed to app.java not to jbang:

jbang app.java --verbose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be more explicit, you can basically put it anywhere, except for the run , alias add and app install commands where you can't put at after the main argument because in those 3 cases it would be considered a user parameter, as Max explained.

@maxandersen maxandersen merged commit ada4ae8 into jbangdev:main Nov 15, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message mentioning to use --verbose by specifying where to place it in the command line
3 participants