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

Setup of any tool doen't work, when the name of the os-user contains blanks #1396

Open
sven-binnig opened this issue Dec 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sven-binnig
Copy link

Expected behavior

As a developer, I want to setup devonfw-ide so that can install the tool-stack I need.
The OS-user-name contains blanks!

Actual behavior

Because of the login user name of the os contains blanks, the validation of the sha256 does not work. The blank breaks the sha256-calculation of downloded artefact with its full qualified file name. The error message mean, that the file could not be found.

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

  1. Use an os-user, whos name contains blanks
  2. Setup devonfw-ide 2024.12.2 (down to 2023.1.1 - older version I haven't validated ...)
  3. Setup java with devon java setup

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Windows
  • Browser: Firefox
@sven-binnig sven-binnig added the bug Something isn't working label Dec 12, 2024
@hohwille
Copy link
Member

Hi @sven-binnig, thanks for your feedback and bug report.
You created more or less a duplicate of #100.
Specific for the shasum256 problem it seems to be the same problem:

checksum_downloadfile="$(eval "${shasum}" "${download_file_path}" | cut -d" " -f1)"

So we are properly quoting the path with double-quotes so the bug is IMHO not in devonfw-ide but in sha256sum at least according to my first guess and analysis - I might still be wrong.

Since we are about to sunset devonfw-ide that is replaced by IDEasy we do not plan to invest a lot of energy into devonfw-ide anymore.

As IDEasy is entirely written in a professional programming language (Java) rather than bash scripts that are hard to maintain and extremely hard to do very good quality assurance (to make it harsh only lead to hacking), we would recommend that you try IDEasy instead.
In Java there are structured types like Path to represent files and folders and they can handle whitespaces and special characters properly without the programmer to take special care with quoting and escaping hacks.
However, as already stated in #100 already tools like Maven cannot handle white-spaces in configured path so you would still need to file bugs in such tools or simply change your user home directory. However, if you are forced to stay with your "odd" user home PATH, you can still keep M2_REPO in $IDE_HOME preventing the error.

@hohwille
Copy link
Member

Ah, now that I look closer since we use eval the double quotes are lost and we would need single quotes additionally.
Easy to fix then - you can try it yourself, but only confirms that bash is not the proper language for complex software with thousands of lines of code.

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
None yet
Development

No branches or pull requests

2 participants