Skip to content

fixed pgAdmin macOS dmg installation#2018

Open
shodiBoy1 wants to merge 4 commits into
devonfw:mainfrom
shodiBoy1:feature/798-878-pgadmin-macos
Open

fixed pgAdmin macOS dmg installation#2018
shodiBoy1 wants to merge 4 commits into
devonfw:mainfrom
shodiBoy1:feature/798-878-pgadmin-macos

Conversation

@shodiBoy1

@shodiBoy1 shodiBoy1 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #798 and #878

Implemented changes:

  • Added proper pgAdmin install handling for macOS: mount the downloaded .dmg, find pgAdmin 4.app, copy it to /Applications with sudo /usr/bin/ditto, then detach the DMG.
  • Fixed PgAdmin#getInstallationPath(...) so an existing PATH-based installation is not ignored.
  • Use the correct binary name per OS: pgAdmin4 on macOS, pgadmin4 on Linux/Windows.
  • Reuse the existing privileged-command logging so users can see the sudo command before entering a password.
  • Added tests for OS-specific binary names and macOS .app detection.

Testing instructions

Check out the PR:

gh pr checkout 1995

Run on a Mac:

  1. Open the project in IntelliJ.
  2. Build the CLI classes once:
mvn -pl cli -DskipTests compile
  1. Go to com.devonfw.tools.ide.cli.Ideasy and select Modify Run Configuration.

  2. Use this run configuration:

Main class: com.devonfw.tools.ide.cli.Ideasy
Module: ide-cli
JRE: Java 25
Program arguments: --debug and 8.14 are only used to make the manual test easier to verify and reproducible. The normal user command is install pgadmin.

Working directory: any IDEasy test project folder, e.g. ~/projects/text-fix

Environment variables: IDE_ROOT=~/projects

VM options: -Dfile.encoding=UTF-8

  1. Click Run.

  2. Run the focused automated tests:

mvn -pl cli -Dtest=PgAdminTest test

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 12, 2026
@shodiBoy1 shodiBoy1 self-assigned this Jun 12, 2026
@shodiBoy1 shodiBoy1 added macOS specific for Apple MacOS pgadmin postgres admin UI integration labels Jun 12, 2026
@coveralls

coveralls commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 27450388724

Coverage decreased (-0.2%) to 70.811%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 121 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

121 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java 81 14.38%
com/devonfw/tools/ide/tool/GlobalToolCommandlet.java 37 10.77%
com/devonfw/tools/ide/version/VersionSegment.java 2 89.24%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%

Coverage Stats

Coverage Status
Relevant Lines: 15900
Covered Lines: 11750
Line Coverage: 73.9%
Relevant Branches: 7102
Covered Branches: 4538
Branch Coverage: 63.9%
Branches in Coverage %: Yes
Coverage Strength: 3.13 hits per line

💛 - Coveralls

@shodiBoy1 shodiBoy1 marked this pull request as ready for review June 13, 2026 14:44
@shodiBoy1 shodiBoy1 moved this from 🆕 New to Team Review in IDEasy board Jun 13, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS specific for Apple MacOS pgadmin postgres admin UI integration

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

pgadmin not working on Mac

3 participants