Skip to content

Commit

Permalink
chore: minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
quintesse committed Jun 9, 2022
1 parent 902c8cb commit 08f0b99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/dev/jbang/cli/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ public class Run extends BaseBuildCommand {
public List<String> userParams = new ArrayList<>();

@Override
public Integer doCall() throws IOException {
protected void requireScriptArgument() {
if (scriptOrFile == null && ((!interactive && !literalScript.isPresent())
|| (literalScript.isPresent() && literalScript.get().isEmpty()))) {
throw new IllegalArgumentException("Missing required parameter: '<scriptOrFile>'");
}
}

@Override
public Integer doCall() throws IOException {
requireScriptArgument();
if (insecure) {
enableInsecure();
}
Expand Down

0 comments on commit 08f0b99

Please sign in to comment.