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

Use PLAYWRIGHT_NODEJS_PATH in getNodeExecutable #468

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

carsonmeyer-wk
Copy link
Contributor

@carsonmeyer-wk carsonmeyer-wk commented Jun 14, 2024

In playwright-go v0.4400.0 some functionality was regressed with the PLAYWRIGHT_NODEJS_PATH env var as playwright.Run command no longer respects it. I have a fix for it but any suggestions to my changes are welcome. Thanks!

@carsonmeyer-wk carsonmeyer-wk changed the title Get PLAYWRIGHT_NODEJS_PATH env var when looking for node executable Use PLAYWRIGHT_NODEJS_PATH in getNodeExecutable Jun 14, 2024
@carsonmeyer-wk carsonmeyer-wk changed the title Use PLAYWRIGHT_NODEJS_PATH in getNodeExecutable Use PLAYWRIGHT_NODEJS_PATH in getNodeExecutable Jun 14, 2024
@carsonmeyer-wk carsonmeyer-wk marked this pull request as ready for review June 14, 2024 18:05
run_test.go Outdated
@@ -88,6 +89,21 @@ func TestShouldNotHangWhenPlaywrightUnexpectedExit(t *testing.T) {
require.Error(t, err)
}

func TestGetNodeExecutable(t *testing.T) {
// When PLAYWRIGHT_NODEJS_PATH is set, use that path.
err := os.Setenv("PLAYWRIGHT_NODEJS_PATH", "envDir")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
err := os.Setenv("PLAYWRIGHT_NODEJS_PATH", "envDir")
err := os.Setenv("PLAYWRIGHT_NODEJS_PATH", "foo/node.exe")

since envDir should be more like a file to the Node.js bindary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, I can change!

@mxschmitt mxschmitt merged commit 3158371 into playwright-community:main Jun 17, 2024
12 of 13 checks passed
@carsonmeyer-wk
Copy link
Contributor Author

@mxschmitt Could I get a release that has this PR in it?

@mxschmitt
Copy link
Member

done.

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.

None yet

2 participants