File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -122,24 +122,24 @@ static int shell_cmd_handler (int argc, char *argv[])
122
122
123
123
* (d - 1 ) = '\0' ;
124
124
125
- if (flags & VERBOSE )
126
- {
127
- printf ("[%s] %lu\n" , source_buffer , strlen (source_buffer ));
128
- }
129
-
130
125
jerry_completion_code_t ret_code ;
131
126
132
127
ret_code = jerry_run_simple ((jerry_char_t * ) source_buffer ,
133
128
strlen (source_buffer ),
134
129
JERRY_FLAG_EMPTY );
135
130
136
- free (source_buffer );
137
-
138
131
if (ret_code != JERRY_COMPLETION_CODE_OK )
139
132
{
140
133
printf ("Failed to run JS\n" );
141
134
}
142
135
136
+ if (flags & VERBOSE || ret_code != JERRY_COMPLETION_CODE_OK )
137
+ {
138
+ printf ("[%s] %lu\n" , source_buffer , strlen (source_buffer ));
139
+ }
140
+
141
+ free (source_buffer );
142
+
143
143
return 0 ;
144
144
} /* shell_cmd_handler */
145
145
You can’t perform that action at this time.
0 commit comments