File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -554,17 +554,24 @@ pub fn build(
554554 }
555555}
556556
557- pub fn pass_through_legacy ( args : Vec < OsString > ) -> i32 {
557+ pub fn pass_through_legacy ( mut args : Vec < OsString > ) -> i32 {
558558 let project_root = helpers:: get_abs_path ( Path :: new ( "." ) ) ;
559559 let workspace_root = helpers:: get_workspace_root ( & project_root) ;
560560
561561 let rescript_legacy_path = helpers:: get_rescript_legacy ( & project_root, workspace_root) ;
562562
563- let status = std:: process:: Command :: new ( rescript_legacy_path)
563+ args. insert ( 0 , rescript_legacy_path. into ( ) ) ;
564+ let status = std:: process:: Command :: new ( "node" )
564565 . args ( args)
565566 . stdout ( Stdio :: inherit ( ) )
566567 . stderr ( Stdio :: inherit ( ) )
567568 . status ( ) ;
568569
569- status. map ( |s| s. code ( ) . unwrap_or ( 1 ) ) . unwrap_or ( 1 )
570+ match status {
571+ Ok ( s) => s. code ( ) . unwrap_or ( 0 ) ,
572+ Err ( err) => {
573+ eprintln ! ( "Error running the legacy build system: {err}" ) ;
574+ 1
575+ }
576+ }
570577}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ cd ../testrepo/packages/compiled-by-legacy
33
44bold " Test: It should use the legacy build system"
55
6- rewatch_legacy
76error_output=$( rewatch_legacy 2>&1 > /dev/null)
87if [ $? -ne 0 ];
98then
You can’t perform that action at this time.
0 commit comments