Repository navigation
Conversation
Coverage Report for CI Build 37221202593Coverage increased (+0.1%) to 74.25%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions281 previously-covered lines in 5 files lost coverage.
Coverage Stats💛 - Coveralls |
hohwille
left a comment
There was a problem hiding this comment.
@shodiBoy1 thanks for analysing and fixing this bug.
The code looks quite redundant to already existing code (e.g. to "extract dmg", the installation routine or to prompt when running privileged operations). I got the impression that we need to understand the root cause properly and fix the bug trying to avoid the copy&paste. I hope we will soon meet in a daily or otherwise to clarify this.
|
Thanks for the review, i reworked it to fix the root cause and reused existing code instead of copying it.
Tested on Mac (arm64):
|
Removed duplicate entry for issue devonfw#1906 regarding 'ide uninstall' failing on macOS.
|
I can confirm, that the automatic test as well as the manuel test are working as described. I was able to install and launch pgAdmin without problems. Although In case, this behavior isn't correct, a new ticket should be created. If this is correct, because we don't want to uninstall a global tool, which might be used by a different project, we also should create a new ticket to clarify the situation improve the message. In case, further manual testing is needed, this are the steps I used to simplify the testing:
|
|
Besides the needed modification of the |
|
I searched in the codebase and found: IDEasy/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java Lines 217 to 221 in 3221b75 so uninstalling isn't just supported yet. There is also ticket #399. Therefore this ticket can move on. |
|
Tested the latest changes from this PR on macOS ARM64 with pgAdmin 9.17. |
|
Hi, it might still take some time until I get this tested. My mac currently has some connectivity issues that I cant seem to get fix right now. |
laim2003
left a comment
There was a problem hiding this comment.
Hi, thanks for your PR! The download and etraction works. I just noticed one weird behaviour: When running pgadmin using the last command in the testing instructions, the terminal did not release after PG admin opened. This is where it stays after launching:
lukasfaber@MacBook-Air-von-Lukas test-fix % cd ~/projects/test-fix
IDE_ROOT=~/projects java -cp "$HOME/projects/ideasy/workspaces/main/IDEasy/cli/target/classes:$(cat /tmp/ide-cp.txt)" com.devonfw.tools.ide.cli.Ideasy pgadmin
No CVEs found for version 9.17 of tool pgadmin.
This could be disruptive for users. Other then that, works perfectly👍🏻
Thanks for catching that, I fixed it and retested. ~/projects/macos-test % IDE_ROOT=~/projects java -cp "$HOME/IdeaProjects/IDEasy/cli/target/classes:$(cat /tmp/ide-cp.txt)" com.devonfw.tools.ide.cli.Ideasy pgadmin
No CVEs found for version 9.17 of tool pgadmin.
~/projects/macos-test % |
Updated issue description for pgAdmin installation fix on macOS.
This PR fixes #798 and #878
Implemented changes:
/Applications.sudocommand is shown before it runs and before the password prompt.#2252getMacApplicationName()/findMacApplicationBundle()to detect an already installed Mac app. IfContents/MacOS/contains the tool binary, that folder is added toPATH.pgAdmin 4on macOS andpgadmin4on Linux and Windows.Testing instructions
Check out the PR:
Automated tests (any OS)
mvn -pl cli -Dtest=FileAccessImplTest,GlobalToolCommandletTest,PgAdminTest testManual test (macOS)
The install copies the app to /Applications with sudo, so it has to run in a real terminal (the IntelliJ Run console can't enter a sudo password).
You should see it download the dmg, print the privileged commands, ask for your password, copy pgAdmin 4.app into /Applications, and start pgAdmin.
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal