Skip to content

Commit

Permalink
MID-8842 ninja - NPE fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 37f9820)
  • Loading branch information
1azyman committed Sep 19, 2023
1 parent 7a9506b commit d5b9e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public String getOperationName() {
@Override
public Void execute() throws Exception {
final File distributionDirectory = options.getDistributionDirectory();
if (distributionDirectory == null) {
throw new NinjaException("Undefined distribution directory");
}

final boolean backupFiles = options.isBackup();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class UpgradeInstallationOptions {

public static final String P_INSTALLATION_DIRECTORY = "--installation-directory";

@Parameter(names = { P_DISTRIBUTION_DIRECTORY }, descriptionKey = "upgradeInstallation.distributionDirectory")
@Parameter(names = { P_DISTRIBUTION_DIRECTORY }, descriptionKey = "upgradeInstallation.distributionDirectory", required = true)
private File distributionDirectory;

@Parameter(names = { P_BACKUP_INSTALLATION_DIRECTORY }, descriptionKey = "upgradeInstallation.backupInstallationDirectory")
Expand Down

0 comments on commit d5b9e95

Please sign in to comment.