GenConfig: honors -s set by users

This commit is contained in:
Carter Li
2026-08-04 23:34:15 +08:00
parent a88ef86ce3
commit e7642ea3a2
3 changed files with 13 additions and 24 deletions
+4
View File
@@ -905,6 +905,10 @@ int main(int argc, char** argv) {
if (__builtin_expect(data.genConfigPath.length == 0, true)) {
run(&data);
} else {
// If we don't have a custom structure, use the default one
if (data.structure.length == 0) {
ffStrbufSetS(&data.structure, FASTFETCH_DATATEXT_STRUCTURE); // Cannot use `ffStrbufSetStatic` here because we will modify the string
}
if (data.genConfigInteractive && !ffGenConfigInteractive(&data)) {
// User cancelled the interactive config generation
ffStrbufDestroy(&data.structure);