File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,11 +271,17 @@ impl FieldValidator {
271271 }
272272
273273 for ( key, val) in map {
274- if let Some ( key_str) = key. as_str ( ) {
274+ let map_key = match key {
275+ Value :: String ( s) => Some ( s. to_string ( ) ) ,
276+ Value :: Bool ( b) => Some ( b. to_string ( ) ) ,
277+ _ => None ,
278+ } ;
279+
280+ if let Some ( key_str) = map_key {
275281 if let Some ( val_str) = val. as_str ( ) {
276282 if !val_str. trim ( ) . is_empty ( ) {
277283 validated_map. insert (
278- Value :: String ( key_str. to_string ( ) ) ,
284+ Value :: String ( key_str) ,
279285 Value :: String ( val_str. to_string ( ) ) ,
280286 ) ;
281287 } else {
@@ -299,7 +305,7 @@ impl FieldValidator {
299305 } else {
300306 visitor. record_error (
301307 self . name . to_string ( ) ,
302- "Package name must be a string" . to_string ( ) ,
308+ "Description key must be a string" . to_string ( ) ,
303309 line_number,
304310 Severity :: Error ,
305311 ) ;
Original file line number Diff line number Diff line change @@ -54,15 +54,15 @@ fn get_soar_env() -> SoarEnv {
5454 return soar_env;
5555 } else {
5656 eprintln ! (
57- "Error: Command produced errors: {}" ,
57+ "Error: `soar env` produced errors: {}" ,
5858 String :: from_utf8_lossy( & cmd_output. stderr)
5959 ) ;
6060 }
6161 } else {
62- eprintln ! ( "Error: Command exited with a non-zero status." ) ;
62+ eprintln ! ( "Error: `soar env` exited with a non-zero status." ) ;
6363 }
6464 } else {
65- eprintln ! ( "Error: Failed to execute command." ) ;
65+ eprintln ! ( "Error: Failed to execute command `soar env` ." ) ;
6666 }
6767 std:: process:: exit ( 1 ) ;
6868}
You can’t perform that action at this time.
0 commit comments