Skip to content

Commit

Permalink
Merge pull request #100 from thevpc/fix/exec-command-throws-null-exce…
Browse files Browse the repository at this point in the history
…ption

Fix `nuts exec` throwing NullPointerException
  • Loading branch information
thevpc authored Oct 30, 2021
2 parents 3769736 + 8209800 commit 43a7c5b
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 43a7c5b

Please sign in to comment.