8342544: [macos] jpackage test helper should check for both "--app-image" and "--mac-sign" for signing predefined app image case

Reviewed-by: asemenyuk
This commit is contained in:
Alexander Matveev 2024-10-31 22:18:26 +00:00
parent 5a5d9c51be
commit 34655c67a8

View File

@ -408,12 +408,14 @@ public final class JPackageCommand extends CommandArguments<JPackageCommand> {
public Path outputBundle() { public Path outputBundle() {
final String bundleName; final String bundleName;
if (isImagePackageType()) { if (isImagePackageType()) {
if (TKit.isOSX() && hasArgument("--app-image")) { String dirName;
return Path.of(getArgumentValue("--app-image", () -> null)); if (!TKit.isOSX()) {
} dirName = name();
String dirName = name(); } else if (hasArgument("--app-image") && hasArgument("--mac-sign")) {
if (TKit.isOSX()) { // Request to sign external app image, not to build a new one
dirName = dirName + ".app"; dirName = getArgumentValue("--app-image");
} else {
dirName = name() + ".app";
} }
bundleName = dirName; bundleName = dirName;
} else if (TKit.isLinux()) { } else if (TKit.isLinux()) {