Skip to content

Fixed EVFEVENT target retrieval from command line#3096

Open
sebjulliand wants to merge 1 commit intomasterfrom
fixGetObjectFromCommand
Open

Fixed EVFEVENT target retrieval from command line#3096
sebjulliand wants to merge 1 commit intomasterfrom
fixGetObjectFromCommand

Conversation

@sebjulliand
Copy link
Member

Changes

Fixes a small regression introduced by #2926 when the FILE target support was added.

This PR fixes a but that would make the getObjectFromCommand returns the source file as the target object for EVFEVENT lookup.

The bug happens if the SRCFILE parameter is found before the actual object name parameter, or if there is no object parameter - because the regular expression that looks up the object paramter will match SRCFILE.

Examples with the issue:

# SRCFILE appears before OBJ - SRCFILE is taken
CRTSQLRPGI SRCFILE(&OPENLIB/&OPENSPF) OBJ(&OPENLIB/&OPENMBR) OBJTYPE(*MODULE) CLOSQLCSR(*ENDMOD) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)

# No object parameter (OBJ, MENU, MODULE, ...) - SRCFILE is taken
RTCRTPGM LIBRARY(&OPENLIB) SRCFILE(&OPENSPF) SRCMBR(&OPENMBR)  SRCTYPE(&EXT) OPTION(*EVENTF) OBJTYPE(*PGM)

As a result, problems are not retrieved after the action has run as you see this in the output:

Fetching errors for SJULLIAND/QRPGLESRC.

Instead of

Fetching errors for SJULLIAND/MY_PROGRAM.

Adding a leading whitespace in the regex to it matches the actual parameter fixes the problem.

How to test this PR

  1. Create or edit an action so the SRCFILE parameter appears before any other parameter in the command line
  2. Run the action
  3. Check the target object for EVFEVENT is the actual object and not the source file from SRCFILE

Checklist

  • have tested my change

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand added this to the 3.0.0 milestone Mar 2, 2026
@sebjulliand sebjulliand requested a review from a team March 2, 2026 09:32
@sebjulliand sebjulliand self-assigned this Mar 2, 2026
@sebjulliand sebjulliand added the bug A confirmed issue when something isn't working as intended label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

👋 A new build is available for this PR based on c128edd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed issue when something isn't working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant