File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ namespace GitVersion
6
6
7
7
public static class Logger
8
8
{
9
+ static readonly Regex ObscurePasswordRegex = new Regex ( "(https?://)(.+)(:.+@)" , RegexOptions . Compiled ) ;
9
10
static string indent = string . Empty ;
10
11
11
12
public static Action < string > WriteInfo { get ; private set ; }
12
13
public static Action < string > WriteWarning { get ; private set ; }
13
14
public static Action < string > WriteError { get ; private set ; }
14
15
16
+
15
17
static Logger ( )
16
18
{
17
19
Reset ( ) ;
@@ -33,8 +35,7 @@ static Action<string> ObscurePassword(Action<string> info)
33
35
{
34
36
Action < string > logAction = s =>
35
37
{
36
- var rgx = new Regex ( "(https?://)(.+)(:.+@)" ) ;
37
- s = rgx . Replace ( s , "$1$2:*******@" ) ;
38
+ s = ObscurePasswordRegex . Replace ( s , "$1$2:*******@" ) ;
38
39
info ( s ) ;
39
40
} ;
40
41
return logAction ;
You can’t perform that action at this time.
0 commit comments