From 3968af7399b80a5397112cc07cb4cbc962873dd9 Mon Sep 17 00:00:00 2001 From: jakozian Date: Tue, 28 Apr 2026 09:57:40 +0200 Subject: [PATCH 1/3] #1688: Override installation path getter to look in windows registry --- .../tools/ide/tool/pgadmin/PgAdmin.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java b/cli/src/main/java/com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java index 46e1499497..9652701931 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java @@ -1,5 +1,8 @@ package com.devonfw.tools.ide.tool.pgadmin; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -7,6 +10,7 @@ import com.devonfw.tools.ide.common.Tag; import com.devonfw.tools.ide.context.IdeContext; +import com.devonfw.tools.ide.os.WindowsHelper; import com.devonfw.tools.ide.tool.GlobalToolCommandlet; import com.devonfw.tools.ide.tool.NativePackageManager; import com.devonfw.tools.ide.tool.PackageManagerCommand; @@ -72,4 +76,30 @@ protected String getBinaryName() { return "pgadmin4"; } + + @Override + protected Path getInstallationPath(String edition, VersionIdentifier resolvedVersion) { + if (super.getInstallationPath(edition, resolvedVersion) == null) { + if (this.context.getSystemInfo().isWindows()) { + return getExecutableFolderFromWindowsRegistry(); + } + } + return null; + } + + private Path getExecutableFolderFromWindowsRegistry() { + + WindowsHelper windowsHelper = WindowsHelper.get(this.context); + String registryPath = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\pgAdmin 4v9_is1"; + String displayIcon = windowsHelper.getRegistryValue(registryPath, "DisplayIcon"); + if (displayIcon != null) { + Path executablePath = Paths.get(displayIcon); + if (Files.isExecutable(executablePath)) { + Path installationDir = executablePath.getParent(); + this.context.getPath().setPath(getName(), installationDir); + return installationDir; + } + } + return null; + } } From 6a1c228baeb1a20ec04538b4b5ae530202c1b2a8 Mon Sep 17 00:00:00 2001 From: jakozian Date: Tue, 28 Apr 2026 09:58:35 +0200 Subject: [PATCH 2/3] #1688: Fix installation flow and thus mention exception --- .../com/devonfw/tools/ide/tool/GlobalToolCommandlet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java index 95c520a3b6..920c0eae48 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java @@ -159,7 +159,7 @@ protected ToolInstallation doInstall(ToolInstallRequest request) { executable = fileAccess.findFirst(downloadBinaryPath, Files::isExecutable, false); } ProcessContext pc = this.context.newProcess().errorHandling(ProcessErrorHandling.LOG_WARNING).executable(executable); - int exitCode = pc.run(ProcessMode.BACKGROUND).getExitCode(); + int exitCode = pc.run(ProcessMode.BACKGROUND_SILENT).getExitCode(); if (tmpDir != null) { fileAccess.delete(tmpDir); } @@ -174,7 +174,8 @@ protected ToolInstallation doInstall(ToolInstallRequest request) { } installationPath = getInstallationPath(toolEdition.edition(), resolvedVersion); if (installationPath == null) { - LOG.warn("Could not find binary {} on PATH after installation.", getBinaryName()); + throw new CliException("The tool " + this.tool + " is about to be installed. Please complete the installation and if required " + + "reboot your machine. Then rerun the command to start the tool.", 2); } return createToolInstallation(installationPath, resolvedVersion, true, pc, false); } From 3c5b463abe8d55cee89ee5ad849503eae41e6a99 Mon Sep 17 00:00:00 2001 From: jakozian Date: Tue, 28 Apr 2026 10:05:02 +0200 Subject: [PATCH 3/3] #861: Add to CHANGELOG --- CHANGELOG.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 8094e25c47..3a90e194b5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -16,6 +16,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/1724[#1724]: Add gui commandlet * https://github.com/devonfw/IDEasy/issues/1853[#1853]: Add ARM releases for VSCode on Mac * https://github.com/devonfw/IDEasy/issues/1723[#1723]: Add commandlet for GitHub Copilot CLI +* https://github.com/devonfw/IDEasy/issues/861[#861]: Fix install of pgadmin throws IllegalStateException when the install wizard starts The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/44?closed=1[milestone 2026.05.001].