File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ struct SQLTests {
36
36
let regexOwner = /(runner|185)/
37
37
38
38
private func cleanUp( _ str: String ) -> String {
39
- return removeOwner ( removeID ( removeLocation ( str) ) )
39
+ return removeOwner ( removeID ( removeLocation ( replaceUserName ( str) ) ) )
40
40
}
41
41
42
42
private func removeID( _ str: String ) -> String {
@@ -51,6 +51,14 @@ struct SQLTests {
51
51
return str. replacing ( regexOwner, with: " * " ) . replacing ( /"Owner\|[^|]*"/ , with: " Owner|*| " )
52
52
}
53
53
54
+ private func replaceUserName( _ str: String ) -> String {
55
+ #if os(macOS) || os(Linux)
56
+ return str. replacing ( ProcessInfo . processInfo. userName, with: " spark " )
57
+ #else
58
+ return str
59
+ #endif
60
+ }
61
+
54
62
private func normalize( _ str: String ) -> String {
55
63
return str. replacing ( /[-]+/ , with: " - " ) . replacing ( /[ ]+/ , with: " " )
56
64
}
You can’t perform that action at this time.
0 commit comments