Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Release with new features and bugfixes:
* https://github.com/devonfw/IDEasy/issues/1853[#1853]: Add ARM releases for VSCode on Mac
* https://github.com/devonfw/IDEasy/issues/797[#797]: Use system unzip on macOS to preserve symlinks in ZIP extraction
* 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
* https://github.com/devonfw/IDEasy/issues/1685[#1685]: Add Nest CLI to IDEasy commandlets

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].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
30 changes: 30 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
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;
import java.util.Set;

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;
Expand Down Expand Up @@ -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;
}
}
Loading