run-test: Fix coding style errors
The original code was likely copied from gjs' console code at the time, which means that its coding style sneaked in. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
This commit is contained in:

committed by
Marge Bot

parent
fecd5cdd6c
commit
696bd09d18
@ -67,12 +67,14 @@ main(int argc, char **argv)
|
|||||||
/* prepare command line arguments */
|
/* prepare command line arguments */
|
||||||
if (!gjs_context_define_string_array (js_context, "ARGV",
|
if (!gjs_context_define_string_array (js_context, "ARGV",
|
||||||
argc - 2, (const char**)argv + 2,
|
argc - 2, (const char**)argv + 2,
|
||||||
&error)) {
|
&error))
|
||||||
|
{
|
||||||
g_printerr ("Failed to defined ARGV: %s", error->message);
|
g_printerr ("Failed to defined ARGV: %s", error->message);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2)
|
||||||
|
{
|
||||||
g_printerr ("Missing filename");
|
g_printerr ("Missing filename");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
@ -86,7 +88,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/* evaluate the script */
|
/* evaluate the script */
|
||||||
bool success = gjs_context_eval_module_file (js_context, filename, &code, &error);
|
bool success = gjs_context_eval_module_file (js_context, filename, &code, &error);
|
||||||
if (!success) {
|
if (!success)
|
||||||
|
{
|
||||||
g_printerr ("%s\n", error->message);
|
g_printerr ("%s\n", error->message);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user