Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix browser empty string flag parsing #1386

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

inancgumus
Copy link
Member

What?

Correctly handles empty string flags that don't have a value.

Why?

See #1385.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: #1385

@inancgumus inancgumus self-assigned this Jun 13, 2024
Currently, passing a flag that doesn't contain a value to
K6_BROWSER_ARGS results in an argument with an equal sign suffix:

K6_BROWSER_ARGS=disable-site-isolation-trials

Results in:
disable-site-isolation-trials=

Instead of:
disable-site-isolation-trials

This PR fixes this problem.
@inancgumus inancgumus force-pushed the fix/chrome-empty-string-flag-parsing branch from c27f714 to a6c0b99 Compare June 13, 2024 13:25
@inancgumus inancgumus requested a review from ankur22 June 13, 2024 13:26
@inancgumus inancgumus marked this pull request as ready for review June 13, 2024 13:27
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM.

The comment I made can be ignored, seems more like i'm nit-picking.

chromium/browser_type.go Outdated Show resolved Hide resolved
@inancgumus inancgumus requested a review from ankur22 June 13, 2024 13:51
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the tests, TIL about the parsing behaviour without looking at the code 🙂

@inancgumus inancgumus merged commit 0fb3063 into main Jun 13, 2024
23 checks passed
@inancgumus inancgumus deleted the fix/chrome-empty-string-flag-parsing branch June 13, 2024 14:04
@inancgumus inancgumus added the bug Something isn't working label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants