Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 9593218

Browse files
Merge pull request #232 from Microsoft/users/angoya/regex
Minor fix for masking regex from logs. We were filtering the regex based on the variables. Removing that check
2 parents e99df48 + 5ac3e4e commit 9593218

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/agent/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,14 @@ function createMaskFunction(jobEnvironment: agentifm.JobEnvironment): Replacemen
430430
var envMasks = jobEnvironment.mask || [];
431431
var maskHints = [];
432432
envMasks.forEach((maskHint: agentifm.MaskHint) => {
433-
if ((maskHint.type === agentifm.MaskType.Variable || maskHint.type === agentifm.MaskType.Regex) && maskHint.value) {
433+
if (maskHint.type === agentifm.MaskType.Variable && maskHint.value) {
434434
if (jobEnvironment.variables[maskHint.value]) {
435435
maskHints.push(maskHint);
436436
}
437437
}
438+
else if (maskHint.type === agentifm.MaskType.Regex && maskHint.value) {
439+
maskHints.push(maskHint);
440+
}
438441
});
439442

440443
if (maskHints.length > 0) {

0 commit comments

Comments
 (0)