File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
notifico-core/src/credentials Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ impl EnvCredentialStorage {
3030 pub fn new ( ) -> Self {
3131 let mut storage = HashMap :: new ( ) ;
3232
33- let re = Regex :: new ( "^NOTIFICO_CRED_(?:([[:xdigit:]]{8}- [[:xdigit:]]{4}- [[:xdigit:]]{4}- [[:xdigit:]]{4}- [[:xdigit:]]{12})_)?(.+)$" ) . unwrap ( ) ;
33+ let re = Regex :: new ( "^NOTIFICO_CRED_(?:([[:xdigit:]]{8}_ [[:xdigit:]]{4}_ [[:xdigit:]]{4}_ [[:xdigit:]]{4}_ [[:xdigit:]]{12})_)?(.+)$" ) . unwrap ( ) ;
3434 for ( name, value) in std:: env:: vars ( ) {
3535 let Some ( captures) = re. captures ( & name) else {
3636 continue ;
3737 } ;
3838
39- let project = captures
40- . get ( 1 )
41- . map_or_else ( Uuid :: nil , |m| Uuid :: parse_str ( m . as_str ( ) ) . unwrap ( ) ) ;
39+ let project = captures. get ( 1 ) . map_or_else ( Uuid :: nil , |m| {
40+ Uuid :: parse_str ( & m . as_str ( ) . replace ( "_" , "-" ) ) . unwrap ( )
41+ } ) ;
4242 let name = captures. get ( 2 ) . unwrap ( ) . as_str ( ) ;
4343 let credential = RawCredential :: from_str ( & value) . unwrap ( ) ;
4444
You can’t perform that action at this time.
0 commit comments