Closed jan-vcapgemini closed 1 year ago
Please try to include logs, as I could not get what the actual problem was and could not reproduce the bug in the first place. So here is my log:
hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn
Running: yarn install
/d/projects/test2/scripts/command/yarn: line 84: yarn: command not found
sed: can't read package.json: No such file or directory
No build script is present in package.json - skipping to run build script.
hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn setup
Running: npm install -g yarn@latest
added 1 package in 1s
hohwille@CE49454 MSYS /d/projects/test2
$ devon yarn
Running: yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.05s.
sed: can't read package.json: No such file or directory
No build script is present in package.json - skipping to run build script.
I am slightly confused why this is happening.
If you call devon yarn
with no argument, it will do this:
https://github.com/devonfw/ide/blob/a66c6261fd7c144adedf264edbe97d96775b8bff/scripts/src/main/resources/scripts/command/yarn#L118
This is calling the following: https://github.com/devonfw/ide/blob/a66c6261fd7c144adedf264edbe97d96775b8bff/scripts/src/main/resources/scripts/command/yarn#L89
And that first calls this: https://github.com/devonfw/ide/blob/a66c6261fd7c144adedf264edbe97d96775b8bff/scripts/src/main/resources/scripts/command/yarn#L78
The actual bug seems to come from this condition: https://github.com/devonfw/ide/blob/a66c6261fd7c144adedf264edbe97d96775b8bff/scripts/src/main/resources/scripts/command/yarn#L34
Typically the silent
argument should only suppress extra log output or extra verbose double checking of the installation.
However, in the current yarn
commandlet the installation is simply skipped if the silent
argument is provided what is obviously a bug.
Expected behavior
As a devonfw-ide Windows and MacOS user I want to install yarn, so that I can use it for my projects.
Actual behavior
devon yarn is not installed automatically (just with devon yarn setup)
Steps to reproduce (bug) / Use Case of feature request (enhancement)
devon yarn
Related/Dependent Issues
Comments/Hints:
Affected version: