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: check for both sf and sfdx env vars #857

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Nov 6, 2023

What does this PR do?

Check for both SF_CONTAINER_MODE and SFDX_CONTAINER_MODE
Check for both SF_DOMAIN_RETRY and SFDX_DOMAIN_RETRY

What issues does this PR fix or reference?

@W-14437987@
#2554

@@ -115,7 +117,8 @@ export class OrgOpenCommand extends SfCommand<OrgOpenOutput> {
if (err instanceof Error) {
if (err.message.includes('timeout')) {
const domain = `https://${/https?:\/\/([^.]*)/.exec(url)?.[1]}.lightning.force.com`;
const timeout = new Duration(new Env().getNumber('SFDX_DOMAIN_RETRY', 240), Duration.Unit.SECONDS);
const domainRetryTimeout = env.getNumber('SF_DOMAIN_RETRY') ?? env.getNumber('SFDX_DOMAIN_RETRY', 240);
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be the same ||?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No because env.getNumber() does not have a default value (like getBoolean() does) so if the env var is not set it returns undefined.

@WillieRuemmele
Copy link
Contributor

QA Notes


SF/DX_CONTAINER_MODE=true -> printed warning correctly
SF/DX_DOMAIN_RETRY =true -> set timeout correctly

@WillieRuemmele WillieRuemmele merged commit c4d0838 into main Nov 6, 2023
14 checks passed
@WillieRuemmele WillieRuemmele deleted the sh/container-mode-env-var branch November 6, 2023 20:44
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