File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1229,19 +1229,13 @@ fn emscripten_version() -> Result<String> {
1229
1229
}
1230
1230
1231
1231
fn emcc_version ( ) -> Result < String > {
1232
- use regex:: bytes:: Regex ;
1233
1232
use std:: process:: Command ;
1234
1233
1235
1234
let emcc = Command :: new ( "emcc" )
1236
- . arg ( "--version " )
1235
+ . arg ( "-dumpversion " )
1237
1236
. output ( )
1238
1237
. context ( "Failed to run emcc to get the version" ) ?;
1239
- let pattern = Regex :: new ( r"^emcc .+? (\d+\.\d+\.\d+).*" ) . unwrap ( ) ;
1240
- let caps = pattern
1241
- . captures ( & emcc. stdout )
1242
- . context ( "Failed to parse emcc version" ) ?;
1243
- let version = caps. get ( 1 ) . context ( "Failed to parse emcc version" ) ?;
1244
- Ok ( String :: from_utf8 ( version. as_bytes ( ) . to_vec ( ) ) ?)
1238
+ Ok ( String :: from_utf8 ( emcc. stdout ) ?. trim ( ) . into ( ) )
1245
1239
}
1246
1240
1247
1241
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments