Skip to content

Should fix issue 39 - #41

Merged
TheTechsTech merged 3 commits into
TheTechsTech:masterfrom
sergxerj:fix-issue-39
Oct 22, 2026
Merged

TheTechsTech merged 3 commits into
TheTechsTech:masterfrom
sergxerj:fix-issue-39

Conversation

@sergxerj

Copy link
Copy Markdown
Contributor

Fixes the regex and algorithm for the runner arguments/switches preprocessing.

Fixes are tested to work on an installed package version with a couple test cases which should theoretically expand to the general case. Tried to build a repo version for testing but tsc started complaining about value and argument type mismatches that have nothing to do with the fix and I don't know where to begin with to start correcting.

…does not return the capturing groups, but the whole string if the match succeeds. The normalizing step was detecting the embedded double quotes and prepending ./ because `\""C:\...\""` is not a valid absolute path string. Tweaked the regex to nongreedy evaluation so it would properly stop before the ending doublequote of the current match instead of the last one in greedy mode.
…ary inner embedded doublequote stripping because the pattern tweaks mean the capture group will never contain an embedded doublequote anyways, and the specified path shouldn't have them either (unix allows, but why would you?). Added explicit prepending with -o after the path normalization step, which was missing, but was getting accidentally properly passed by the erroneous .match() full-string match before the normalizing step.
…ty() check. a `files: undefined` would not be deleted and the key would be attempted to process by the `for (const s in switches)` loop of the `Switches()` function, erroring out with "Cannot read properties of undefined (reading 'includes')" on line 203.

@TheTechsTech TheTechsTech left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the whole CI build needs updating, too old.

@TheTechsTech
TheTechsTech merged commit 5ea5205 into TheTechsTech:master Oct 22, 2026
1 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants