@@ -446,12 +446,10 @@ def main(): # noqa: C901, PLR0912, PLR0915
446
446
explicit_dst_path = uses_at_notation ))
447
447
else :
448
448
diagnostics .error (f'${ arg } does not exist' )
449
- return 1
450
449
elif leading == 'exclude' :
451
450
excluded_patterns .append (arg )
452
451
else :
453
452
diagnostics .error ('Unknown parameter:' , arg )
454
- return 1
455
453
456
454
options .has_preloaded = any (f .mode == 'preload' for f in data_files )
457
455
options .has_embedded = any (f .mode == 'embed' for f in data_files )
@@ -461,24 +459,18 @@ def main(): # noqa: C901, PLR0912, PLR0915
461
459
'for deprecation. If you need this feature please comment at '
462
460
'https://github.com/emscripten-core/emscripten/issues/24803' )
463
461
464
- if options .separate_metadata :
465
- if not options .has_preloaded or not options .jsoutput :
466
- err ('cannot separate-metadata without both --preloaded files '
467
- 'and a specified --js-output' )
468
- return 1
462
+ if options .separate_metadata and (not options .has_preloaded or not options .jsoutput ):
463
+ diagnostics .error ('cannot separate-metadata without both --preloaded files and a specified --js-output' )
469
464
470
465
if not options .from_emcc and not options .quiet :
471
466
diagnostics .warn ('Remember to build the main file with `-sFORCE_FILESYSTEM` '
472
467
'so that it includes support for loading this file package' )
473
468
474
469
if options .jsoutput and os .path .abspath (options .jsoutput ) == os .path .abspath (data_target ):
475
470
diagnostics .error ('TARGET should not be the same value of --js-output' )
476
- return 1
477
471
478
472
if options .from_emcc and options .export_es6 :
479
- diagnostics .error ('Can\' t use --export-es6 option together with --from-emcc since the code should be embedded '
480
- 'within emcc\' s code' )
481
- return 1
473
+ diagnostics .error ("Can't use --export-es6 option together with --from-emcc since the code should be embedded within emcc's code" )
482
474
483
475
walked .append (__file__ )
484
476
for file_ in data_files :
@@ -492,7 +484,6 @@ def main(): # noqa: C901, PLR0912, PLR0915
492
484
if not os .path .isdir (file_ .srcpath )]
493
485
if len (data_files ) == 0 :
494
486
diagnostics .error ('Nothing to do!' )
495
- sys .exit (1 )
496
487
497
488
# Absolutize paths, and check that they make sense
498
489
# os.getcwd() always returns the hard path with any symbolic links resolved,
@@ -557,7 +548,6 @@ def was_seen(name):
557
548
if options .obj_output :
558
549
if not options .has_embedded :
559
550
diagnostics .error ('--obj-output is only applicable when embedding files' )
560
- return 1
561
551
generate_object_file (data_files )
562
552
if not options .has_preloaded :
563
553
return 0
0 commit comments