Skip to content

Commit

Permalink
Fix nuts exec throwing NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
bacali95 committed Oct 30, 2021
1 parent b62b0d4 commit 8209800
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public NutsExecutableInformation which() {
}
terminal.out().flush();
terminal.err().flush();
String[] ts = command.toArray(new String[0]);
if (ts.length == 0) {
if (command == null || command.size() == 0) {
throw new NutsIllegalArgumentException(traceSession, NutsMessage.plain("missing command"));
}
String[] ts = command.toArray(new String[0]);
NutsExecutableInformationExt exec = null;
execSession.setTerminal(terminal);
NutsExecutionType executionType = this.getExecutionType();
Expand Down

0 comments on commit 8209800

Please sign in to comment.