-
Notifications
You must be signed in to change notification settings - Fork 23
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
#63: check if inside ide installation for wrapper script #276
#63: check if inside ide installation for wrapper script #276
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your addition. I've just added one small CR.
if (firstCandidate == null) { // no arguments | ||
if (current.getArgs().isEmpty()) { | ||
info(getMessageIdeHomeFound()); | ||
return ProcessResult.SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better remove the return, otherwise we can't show the help if no arguments were provided.
return ProcessResult.SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not get this change.
If the firstCandidate
was not found, the first argument is not the keyword of a Commandlet
.
This can happen e.g. if a add an option to a commandlet (see e.g. #279).
In such case the second for
loop below handles the case to find the proper commandlet.
This however has nothing to do with the fact if IDE_HOME
was found or not.
already fixed in #282 |
Fixes: #63
I haven't fully understood this part of the issue:
"Please note that you cannot output the message to std out from ideasy env --bash. So either we need to print it as error or we have to think of a different approach"
With this PR, the following is output:
IDE environment variables have been set for ...
to stdout if inside an IDE installationYou are not inside an IDE installation: ...
to stderr if outside an IDE installation