We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffeb0b9 commit 285ca20Copy full SHA for 285ca20
src/main/java/com/yanglb/codegen/core/parser/BaseParser.java
@@ -52,8 +52,9 @@ protected Options options() {
52
Option fn = Option.builder("fn")
53
.longOpt("file-name")
54
.argName("fn")
55
- .desc("生成的文件名,默认为Excel名")
+ .desc("生成的文件名,默认为Excel名,可为空值。")
56
.hasArg(true)
57
+ .optionalArg(true)
58
.build();
59
options.addOption(fn);
60
src/main/java/com/yanglb/codegen/model/ParameterModel.java
@@ -30,7 +30,8 @@ public String getOptDir() {
30
return options.getOptionValue("out", "out");
31
}
32
public String getFileName() {
33
- return options.getOptionValue("fn");
+ if (!options.hasOption("fn")) return null;
34
+ return options.getOptionValue("fn", "");
35
36
37
public String getCmd() {
0 commit comments