Skip to content

Commit

Permalink
allow hooks in mixed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kwin committed Mar 27, 2021
1 parent 87b6c42 commit 67802f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static boolean isPackagePathInstalledConditionally(String runMode, Path packageR
// is it install hook?
if (filePath.startsWith(INSTALL_HOOK_PATH) && filePath.toString().endsWith(".jar")) {
// is it mutable content package?
if (PackageType.CONTENT.equals(packageType) || PackageType.MIXED.equals(packageType)) {
if (PackageType.CONTENT.equals(packageType)) {
return Collections.singleton(new ValidationMessage(defaultSeverity, VIOLATION_MESSAGE_INSTALL_HOOK_IN_MUTABLE_PACKAGE));
} else if (packageType == null) {
// defer checking until one is sure that the package has mutable content
Expand Down Expand Up @@ -217,7 +217,7 @@ static boolean isPackagePathInstalledConditionally(String runMode, Path packageR
@Override
public @Nullable Collection<ValidationMessage> validate(@NotNull PackageProperties properties) {
if (!properties.getExternalHooks().isEmpty()) {
if (PackageType.CONTENT.equals(packageType) || PackageType.MIXED.equals(packageType)) {
if (PackageType.CONTENT.equals(packageType)) {
return Collections.singleton(new ValidationMessage(defaultSeverity, VIOLATION_MESSAGE_INSTALL_HOOK_IN_MUTABLE_PACKAGE));
}
}
Expand Down

0 comments on commit 67802f7

Please sign in to comment.