g-ir-compiler: Only accept one input file

The positional parameters are declared as G_OPTION_ARG_FILENAME_ARRAY,
but only the first one is used.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2024-02-14 11:11:14 +00:00
parent b974fa4e50
commit e6d2c2c040

View File

@ -197,6 +197,12 @@ main (int argc, char **argv)
return 1;
}
if (g_strv_length (input) != 1)
{
g_printerr ("Please specify only one input file\n");
return 1;
}
g_debug ("[parsing] start, %d includes",
includedirs ? g_strv_length (includedirs) : 0);