devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
8 stars 20 forks source link

When using CMD to use IDEasy the output of the commandlet is not shown #234

Open MustaphaOuchen opened 7 months ago

MustaphaOuchen commented 7 months ago

Expected behavior

As a user, I want to see the output when CMD is used.

Actual behavior

The output is not printed in the cmd console. but it can be still be redirected to a file or with the more command.

Steps to reproduce

You need a branch with the state of https://github.com/devonfw/IDEasy/issues/9

First lets try to reproduce expected behavior, which works when using bash.

With IDEasy

  1. Navigate to the cli directory of the project using (devon) bash
  2. Run: mvn clean install in the root of the project
  3. Run: devon mvn exec:java -Dexec.mainClass=com.devonfw.tools.ide.cli.Ideasy -Dexec.args=jmc

Image

With simple bash: bash -c /d/projects/IDEasy/software/jmc/jmc.exe & diswon

Image

Doing the steps above with cmd (replace bash with the location of bash.exe, use "", see screenshot) we do not get any output.

Image

Image

But, the output of the cmd will be shown when you use the 'more' command or you can still redirect it with '>' to a file.

Image

Related/Dependent Issues

https://github.com/devonfw/IDEasy/issues/9

Affected version:

hohwille commented 7 months ago

I am not quite sure but to me it looks this is not a bug of IDEasy but a problem of MS DOS aka CMD Shell. In the latter case we can only try to search the web for a workaround but if we find none there is nothing we can do about it.

However, what we also should do is educate developers to use bash. This is a Windows specific issue but as we need git for windows installed every developer has a git-bash as prerequisite and therefore developers should stop using crappy old CMD and just get used to bash.