File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed
Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-cli " : " patch:bug"
3+ " @tauri-apps/cli " : " patch:bug"
4+ ---
5+
6+ Fix ` tauri info ` crashing when Node.js is not installed.
Original file line number Diff line number Diff line change @@ -42,17 +42,17 @@ pub fn items(metadata: &VersionMetadata) -> Vec<SectionItem> {
4242 . unwrap_or_default( )
4343 . trim( ) ;
4444 ActionResult :: Description ( format!( "node: {}{}" , v, {
45- let version = semver:: Version :: parse( v) . unwrap ( ) ;
46- let target_version = semver:: Version :: parse( node_target_ver. as_str( ) ) . unwrap ( ) ;
47- if version < target_version {
48- format! (
49- " ({}, latest: {})" ,
50- "outdated" . red ( ) ,
51- target_version . to_string ( ) . green ( )
52- )
53- } else {
54- "" . into ( )
55- }
45+ let version = semver:: Version :: parse( v) ;
46+ let target_version = semver:: Version :: parse( node_target_ver. as_str( ) ) ;
47+ match ( version, target_version) {
48+ ( Ok ( version ) , Ok ( target_version ) ) if version < target_version => {
49+ format! (
50+ " ({}, latest: {})" ,
51+ "outdated" . red ( ) ,
52+ target_version . to_string ( ) . green ( )
53+ )
54+ }
55+ _ => "" . into ( ) ,
5656 } ) )
5757 } else {
5858 ActionResult :: None
You can’t perform that action at this time.
0 commit comments