Commit d9893bb
committed
fix(parser): don't anchor comment directives on comment lines
The @Description/@Interactive/@InjectSSHAgent/@NoArtifactsToSource
injection used /\w:/ to find the job to attach a pending directive to.
That regex also matches a colon inside a comment line, so a multi-line
'# @description ...: ...' block (or any comment containing 'word:')
was treated as the anchor. The 2-space 'gclDescription:' line then got
spliced in after a comment, landing on the previous job — producing a
duplicate mapping key and the 'duplicated mapping key detected! Values
will be overwritten!' warning.
Skip comment lines entirely when scanning for the anchor, and only
anchor on a real top-level key (/^[\w.$-]+:/) so indented keys and
comments can never be mistaken for a job.1 parent cfc7aaf commit d9893bb
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | | - | |
| 309 | + | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| |||
0 commit comments