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[])
122122
123123 * (d - 1 ) = '\0' ;
124124
125- if (flags & VERBOSE )
126- {
127- printf ("[%s] %lu\n" , source_buffer , strlen (source_buffer ));
128- }
129-
130125 jerry_completion_code_t ret_code ;
131126
132127 ret_code = jerry_run_simple ((jerry_char_t * ) source_buffer ,
133128 strlen (source_buffer ),
134129 JERRY_FLAG_EMPTY );
135130
136- free (source_buffer );
137-
138131 if (ret_code != JERRY_COMPLETION_CODE_OK )
139132 {
140133 printf ("Failed to run JS\n" );
141134 }
142135
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+
143143 return 0 ;
144144} /* shell_cmd_handler */
145145
You can’t perform that action at this time.
0 commit comments