Skip to content

Commit 011acd7

Browse files
committed
fix(rules:if): interpolate rhs value in assertion message
Double-quoted string prevented ${rhs} from expanding; the assert message showed the literal text "${rhs}" instead of the actual value.
1 parent 919bb83 commit 011acd7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export class Utils {
291291
});
292292

293293
const assertMsg = [
294-
"RHS (${rhs}) must be a regex pattern. Do not rely on this behavior!",
294+
`RHS (${rhs}) must be a regex pattern. Do not rely on this behavior!`,
295295
"Refer to https://docs.gitlab.com/ee/ci/jobs/job_rules.html#unexpected-behavior-from-regular-expression-matching-with- for more info...",
296296
];
297297
assert(_rhs !== regexStr, assertMsg.join("\n"));

0 commit comments

Comments
 (0)