Fix ShellOption with required

- Where applicable mark option required so that
  user is notified instead of blindly using null.
- Fixes #436
This commit is contained in:
Janne Valkealahti
2022-06-02 08:41:48 +01:00
parent 0be37d164f
commit f7992a682e
2 changed files with 28 additions and 2 deletions

View File

@@ -140,6 +140,9 @@ public class StandardMethodTargetRegistrar implements MethodTargetRegistrar, App
&& !ObjectUtils.nullSafeEquals(so.defaultValue(), ShellOption.NULL)) {
optionSpec.defaultValue(so.defaultValue());
}
else {
optionSpec.required();
}
}
}
else {