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() {
final String bundleName;
if (isImagePackageType()) {
if (TKit.isOSX() && hasArgument("--app-image")) {
return Path.of(getArgumentValue("--app-image", () -> null));
}
String dirName = name();
if (TKit.isOSX()) {
dirName = dirName + ".app";
String dirName;
if (!TKit.isOSX()) {
dirName = name();
} else if (hasArgument("--app-image") && hasArgument("--mac-sign")) {
// Request to sign external app image, not to build a new one
dirName = getArgumentValue("--app-image");
} else {
dirName = name() + ".app";
}
bundleName = dirName;
} else if (TKit.isLinux()) {