-
Notifications
You must be signed in to change notification settings - Fork 34
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
#400: ide output outside IDEasy installation #405
Closed
mvomiero
wants to merge
7
commits into
devonfw:main
from
mvomiero:bug/400-IdeOutputOutsideInstallation
Closed
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
603deda
bugfix
mvomiero 4b6238d
remove log idehomenotfound
mvomiero f5b0765
Merge branch 'main' into bug/400-IdeOutputOutsideInstallation
mvomiero b124f7d
Merge branch 'main' into bug/400-IdeOutputOutsideInstallation
mvomiero 5fdac3c
Merge remote-tracking branch 'upstream/main' into bug/400-IdeOutputOu…
mvomiero 791c321
reformat code
mvomiero 8121fe7
reformat code
mvomiero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Actually this is a different error/warning. Even if IDE_HOME is not found because you are outside of an IDEasy project, the installer should set a environment variable IDE_ROOT on your OS (e.g. in Windows environment variables for user).
What you are actually looking for is this one:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java
Line 283 in ee596da
It is already printed here:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java
Lines 183 to 184 in ee596da
IMHO we need to investigate this further, because you removed the actual code that should print the expected message.
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 rather think that the only problem is that
info
needs to be changed toerror
since the first is writing to standard out while the latter is writing to standard error.Standard out is written into the variable for the variables to set using
eval
command.If the exit code is not 0 that output is discarded by wrapper script.
You can test that is works properly in IntelliJ but the output is hidden by the wrapper script.
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.
changed info to error, the log was printed anyways two times.
I went for this new solution that avoids redundant code as well (calling
getMessageIdeHomeNotFound()
two times) :getMessageIdeHomeNotFound()
hat to be changed because in some casesthis.cwd
was equal to nullThere 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 already fixed this in PR #424 so that would replace this PR.
However, there is a strange bug happening on github that cannot be reproduced locally on any OS including linux preventing the merge of PR #424. Since I do not have time currently to investigate this further, I wanted to merge this PR and later rebase PR #424.
However, this is still incorrect: There are two more or less independent warnings:
I do not see a duplication of messages and still think you are removing an error log message that was still intended.
The actual problem is the
null
and the fact that our wrapper script is kind of buggy or the log-level of the IdeHome message is info but should be error.Maybe I can find the time to reduce one of my PRs and get the actual bash-completion stuff out until it gets green and I can reuse it to fix #400. That would most probably be the best way to go to get this all sorted out quickly...