Skip to content

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

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

aslushnikov
Copy link
Contributor

@aslushnikov aslushnikov commented Jan 15, 2022

Fixes #772

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"));
Copy link
Member

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?

Copy link
Contributor Author

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");
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@yury-s yury-s left a 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

@aslushnikov aslushnikov merged commit 6b30c0b into microsoft:main Jan 19, 2022
@aslushnikov aslushnikov deleted the pass-env-everywhere branch January 19, 2022 13:15
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.

internal: setup env variables when launching driver
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy