Skip to content

Commit 8148053

Browse files
committed
Custom: make --custom-format optional
1 parent 982e8a0 commit 8148053

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

doc/json_schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,9 @@
11171117
"maxItems": 2
11181118
}
11191119
}
1120+
},
1121+
"key": {
1122+
"$ref": "#/$defs/key"
11201123
}
11211124
}
11221125
},
@@ -1174,10 +1177,7 @@
11741177
"description": "Text to print",
11751178
"type": "string"
11761179
}
1177-
},
1178-
"required": [
1179-
"format"
1180-
]
1180+
}
11811181
},
11821182
{
11831183
"title": "Display",

src/modules/custom/custom.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66

77
void ffPrintCustom(FFCustomOptions* options)
88
{
9-
if (options->moduleArgs.outputFormat.length == 0)
10-
{
11-
ffPrintError(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "output format must be set for custom module");
12-
return;
13-
}
14-
159
ffPrintLogoAndKey(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
1610
ffStrbufWriteTo(&options->moduleArgs.outputFormat, stdout);
1711
puts(FASTFETCH_TEXT_MODIFIER_RESET);

0 commit comments

Comments
 (0)