File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ static void print_help(char **argv) {
318318 printf (
319319 "usage: %s [<opts>] [-X <implopt>] [-c <command> | -m <module> | <filename>]\n"
320320 "Options:\n"
321+ "--version : show version information\n"
321322 "-h : print this help message\n"
322323 "-i : enable inspection via REPL after running command/module/file\n"
323324 #if MICROPY_DEBUG_PRINTERS
@@ -369,6 +370,10 @@ static void pre_process_options(int argc, char **argv) {
369370 print_help (argv );
370371 exit (0 );
371372 }
373+ if (strcmp (argv [a ], "--version" ) == 0 ) {
374+ printf (MICROPY_BANNER_NAME_AND_VERSION "; " MICROPY_BANNER_MACHINE "\n" );
375+ exit (0 );
376+ }
372377 if (strcmp (argv [a ], "-X" ) == 0 ) {
373378 if (a + 1 >= argc ) {
374379 exit (invalid_args ());
You can’t perform that action at this time.
0 commit comments