File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,13 @@ struct ConfigFile {
4242 pub content : String ,
4343}
4444
45- /// Gets the paths (semicolon -separated) from the `AXVISOR_VM_CONFIGS` environment variable.
45+ /// Gets the paths (colon -separated) from the `AXVISOR_VM_CONFIGS` environment variable.
4646///
4747/// Returns `None` if the environment variable is not set.
4848fn get_config_paths ( ) -> Option < Vec < OsString > > {
4949 env:: var ( "AXVISOR_VM_CONFIGS" )
5050 . ok ( )
51- . map ( |paths| {
52- paths
53- . split ( ';' )
54- . map ( |s| OsString :: from ( s. trim ( ) ) )
55- . collect ( )
56- } )
51+ . map ( |paths| env:: split_paths ( & paths) . map ( OsString :: from) . collect ( ) )
5752}
5853
5954/// Gets the paths and contents of the configuration files specified by the `AXVISOR_VM_CONFIGS` environment variable.
Original file line number Diff line number Diff line change 1- use std:: path:: PathBuf ;
1+ use std:: { env , path:: PathBuf } ;
22
33use anyhow:: Context as _;
44use ostool:: build:: config:: { Cargo , LogLevel } ;
@@ -85,12 +85,12 @@ impl Context {
8585 }
8686
8787 if !vm_config_paths. is_empty ( ) {
88- let value = vm_config_paths
89- . iter ( )
90- . map ( |p| format ! ( "{}" , p . display ( ) ) )
91- . collect :: < Vec < _ > > ( )
92- . join ( ";" ) ;
93- cargo . env . insert ( "AXVISOR_VM_CONFIGS" . to_string ( ) , value ) ;
88+ if let Ok ( joined ) = env :: join_paths ( & vm_config_paths) {
89+ cargo . env . insert (
90+ "AXVISOR_VM_CONFIGS" . to_string ( ) ,
91+ joined . to_string_lossy ( ) . into_owned ( )
92+ ) ;
93+ }
9494 }
9595
9696 Ok ( cargo)
You can’t perform that action at this time.
0 commit comments