File tree 1 file changed +14
-2
lines changed 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,26 @@ pub(crate) fn cargo_config_env(
75
75
}
76
76
// if successful we receive `env.key.value = "value" per entry
77
77
tracing:: debug!( "Discovering cargo config env by {:?}" , cargo_config) ;
78
- utf8_stdout ( cargo_config) . map ( parse_output_cargo_config_env) . unwrap_or_default ( )
78
+ utf8_stdout ( cargo_config)
79
+ . map ( parse_output_cargo_config_env)
80
+ . inspect ( |env| {
81
+ tracing:: debug!( "Discovered cargo config env: {:?}" , env) ;
82
+ } )
83
+ . inspect_err ( |err| {
84
+ tracing:: error!( "Failed to discover cargo config env: {:?}" , err) ;
85
+ } )
86
+ . unwrap_or_default ( )
79
87
}
80
88
81
89
fn parse_output_cargo_config_env ( stdout : String ) -> FxHashMap < String , String > {
82
90
stdout
83
91
. lines ( )
84
92
. filter_map ( |l| l. strip_prefix ( "env." ) )
85
- . filter_map ( |l| l. split_once ( ".value = " ) )
93
+ . filter_map ( |l| {
94
+ l. split_once ( " = " )
95
+ // cargo used to report it with this, keep it for a couple releases around
96
+ . or_else ( || l. split_once ( ".value = " ) )
97
+ } )
86
98
. map ( |( key, value) | ( key. to_owned ( ) , value. trim_matches ( '"' ) . to_owned ( ) ) )
87
99
. collect ( )
88
100
}
You can’t perform that action at this time.
0 commit comments