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

ide.bat not printing if IDEasy was initialized #894

Open
hohwille opened this issue Dec 12, 2024 · 0 comments · May be fixed by #902
Open

ide.bat not printing if IDEasy was initialized #894

hohwille opened this issue Dec 12, 2024 · 0 comments · May be fixed by #902
Assignees
Labels
bug Something isn't working

Comments

@hohwille
Copy link
Member

Expected behavior

As a IDEasy user who for some odd reason is ignorant and still using CMD, I want that after setting up my environment with the ide command the according success message gets printed so that I get the appropriate feedback.

Actual behavior

In CMD no message is printed at all no matter if I was inside an IDEasy project or not after calling ide command (ide.bat).

D:\projects>ide


D:\projects>cd IDEasy

D:\projects\IDEasy>ide

D:\projects\IDEasy>

The interesting thing is that there is a tiny difference: If the setup failed because I was not inside an IDEasy project, I get an extra empty line logged.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. open CMD inside your IDEasy project
  2. run ide command

Related/Dependent Issues

See #886

Comments/Hints:

for /f "tokens=*" %%i in ('ideasy %IDE_OPTIONS% env') do (
call set %%i
)
if not %ERRORLEVEL% == 0 (
echo IDE environment variables have been set for %IDE_HOME% in workspace %WORKSPACE%
)

So we want to get the exit code of ideasy ... env command but the way we are doing this seems to be wrong.
The question is if the call set %%i command is also setting (overriding) the ERRORLEVEL variable.
Finally, the major question is why the ERRORLEVEL is never zero - so is there always an error happening?.
The general variable and pattern was already used before in devonfw-ide and used to work:
https://github.com/devonfw/ide/blob/8698d2ba7468d34aec82c86fabdb09b5ee84d9c8/scripts/src/main/resources/scripts/devon.bat#L94

Affected version:

  • OS: Windows
  • 2024.12.001-beta-12_10_02-SNAPSHOT
@hohwille hohwille added the bug Something isn't working label Dec 12, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Dec 12, 2024
@alfeilex alfeilex self-assigned this Dec 17, 2024
@alfeilex alfeilex moved this from 🆕 New to 🏗 In progress in IDEasy board Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants