File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
- use std:: path:: Path ;
1
+ use std:: { env , path:: Path } ;
2
2
3
3
use nu_ansi_term:: Color :: { Blue , Green , Red } ;
4
4
use rusqlite:: prepare_and_bind;
@@ -8,11 +8,21 @@ use soar_core::{
8
8
utils:: { desktop_dir, icons_dir, process_dir} ,
9
9
SoarResult ,
10
10
} ;
11
- use tracing:: info;
11
+ use tracing:: { info, warn } ;
12
12
13
13
use crate :: { state:: AppState , utils:: Colored } ;
14
14
15
15
pub async fn display_health ( ) -> SoarResult < ( ) > {
16
+ let path_env = env:: var ( "PATH" ) ?;
17
+ let bin_path = get_config ( ) . get_bin_path ( ) ?;
18
+ if !path_env. split ( ':' ) . any ( |p| Path :: new ( p) == bin_path) {
19
+ warn ! (
20
+ "{} is not in {1}. Please add it to {1} to use installed binaries.\n " ,
21
+ Colored ( Blue , bin_path. display( ) ) ,
22
+ Colored ( Green , "PATH" )
23
+ ) ;
24
+ }
25
+
16
26
list_broken_packages ( ) . await ?;
17
27
println ! ( "" ) ;
18
28
list_broken_symlinks ( ) ?;
You can’t perform that action at this time.
0 commit comments