-
Notifications
You must be signed in to change notification settings - Fork 234
fix: pass required env variables for new driver #774
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
Conversation
playwright/src/main/java/com/microsoft/playwright/impl/Utils.java
Outdated
Show resolved
Hide resolved
dadd34c
to
8df99b7
Compare
APIResponse response = request.get(server.EMPTY_PAGE); | ||
assertTrue(response.ok()); | ||
assertEquals(server.EMPTY_PAGE, response.url()); | ||
assertTrue(serverRequest.get().headers.get("user-agent").get(0).contains("java")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also check version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -65,6 +65,25 @@ public Path driverPath() { | |||
return driverDir().resolve(cliFileName); | |||
} | |||
|
|||
public static void setRequiredEnvironmentVariables(ProcessBuilder pb) { | |||
if (!pb.environment().containsKey("PW_CLI_TARGET_LANG")) { | |||
pb.environment().put("PW_CLI_TARGET_LANG", "java"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like PW_CLI_TARGET_LANG /PW_CLI_TARGET_LANG_VERSION are used beyond just codegen, let's rename them (in separate pr) to PW_LANG / PW_LANG_VERSION before it's too late?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do this in a follow-up and on tip-of-tree only.
I filed an issue for myself regarding this: microsoft/playwright#11450
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, the test is failing though
b62b3ff
to
17c1aa5
Compare
17c1aa5
to
0e2abf1
Compare
Fixes #772