Custom: make --custom-format optional

This commit is contained in:
李通洲
2024-05-01 15:54:30 +08:00
parent 982e8a0117
commit 81480532e2
2 changed files with 4 additions and 10 deletions
+4 -4
View File
@@ -1117,6 +1117,9 @@
"maxItems": 2
}
}
},
"key": {
"$ref": "#/$defs/key"
}
}
},
@@ -1174,10 +1177,7 @@
"description": "Text to print",
"type": "string"
}
},
"required": [
"format"
]
}
},
{
"title": "Display",
-6
View File
@@ -6,12 +6,6 @@
void ffPrintCustom(FFCustomOptions* options)
{
if (options->moduleArgs.outputFormat.length == 0)
{
ffPrintError(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "output format must be set for custom module");
return;
}
ffPrintLogoAndKey(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
ffStrbufWriteTo(&options->moduleArgs.outputFormat, stdout);
puts(FASTFETCH_TEXT_MODIFIER_RESET);