@@ -99,14 +99,14 @@ fn generate_ast(
9999 "-bs-ast" . to_string( ) ,
100100 "-o" . to_string( ) ,
101101 ast_path. to_string( ) ,
102- helpers:: canonicalize_string_path( file) ,
102+ helpers:: canonicalize_string_path( file) . unwrap ( ) ,
103103 ] ,
104104 ]
105105 . concat ( ) ;
106106
107107 /* Create .ast */
108108 let res_to_ast = Command :: new ( helpers:: get_bsc ( & root_path) )
109- . current_dir ( helpers:: canonicalize_string_path ( & build_path_abs) )
109+ . current_dir ( helpers:: canonicalize_string_path ( & build_path_abs) . unwrap ( ) )
110110 . args ( res_to_ast_args)
111111 . output ( )
112112 . expect ( "Error converting .res to .ast" ) ;
@@ -606,7 +606,7 @@ pub fn compile_mlmap(package: &package_tree::Package, namespace: &str, root_path
606606 . concat ( ) ;
607607
608608 let _ = Command :: new ( helpers:: get_bsc ( & root_path) )
609- . current_dir ( helpers:: canonicalize_string_path ( & build_path_abs) )
609+ . current_dir ( helpers:: canonicalize_string_path ( & build_path_abs) . unwrap ( ) )
610610 . args ( args)
611611 . output ( )
612612 . expect ( "err" ) ;
@@ -646,7 +646,7 @@ pub fn compile_file(
646646 . map ( |x| {
647647 vec ! [
648648 "-I" . to_string( ) ,
649- helpers:: canonicalize_string_path( & helpers:: get_build_path( root_path, & x) ) ,
649+ helpers:: canonicalize_string_path( & helpers:: get_build_path( root_path, & x) ) . unwrap ( ) ,
650650 ]
651651 } )
652652 . collect :: < Vec < Vec < String > > > ( ) ;
@@ -713,14 +713,12 @@ pub fn compile_file(
713713 // "-I".to_string(),
714714 // abs_node_modules_path.to_string() + "/rescript/ocaml",
715715 // ],
716- vec![ helpers:: canonicalize_string_path( & ast_path. to_owned( ) ) ] ,
716+ vec![ helpers:: canonicalize_string_path( & ast_path. to_owned( ) ) . unwrap ( ) ] ,
717717 ]
718718 . concat ( ) ;
719719
720720 let to_mjs = Command :: new ( helpers:: get_bsc ( & root_path) )
721- . current_dir ( helpers:: canonicalize_string_path (
722- & build_path_abs. to_owned ( ) ,
723- ) )
721+ . current_dir ( helpers:: canonicalize_string_path ( & build_path_abs. to_owned ( ) ) . unwrap ( ) )
724722 . args ( to_mjs_args)
725723 . output ( ) ;
726724
0 commit comments