-
Notifications
You must be signed in to change notification settings - Fork 69
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
Sm/fix is scratch #610
Sm/fix is scratch #610
Conversation
Thanks for the contribution! Unfortunately we can't verify the commit author(s): SF-CLI-BOT <s***@g***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated. |
@@ -655,7 +655,7 @@ export class Org extends AsyncOptionalCreatable<Org.Options> { | |||
const username = this.getUsername(); | |||
if (username) { | |||
const organization = await this.retrieveOrganizationInformation(); | |||
const isScratch = organization.IsSandbox && organization.TrialExpirationDate; | |||
const isScratch = organization.IsSandbox && Boolean(organization.TrialExpirationDate); |
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.
surprising that it's not !organization.IsSandbox
. Seems like .IsSandbox
should not be true
when it's a scratch org... so continues the difficulties of determining scratch orgs
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.
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.
to the server, isSandbox means, "is it running on sandbox infra?" and therefore scratch orgs are sandboxes.
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_organization.htm
I know. Not confusing at all
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.
I guess IsSandbox ? it's a sandbox : it's a prod org
no options for scratch orgs :)
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.
yep
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.
it's the enum
-based keys, combined with types that extend & JsonMap
, that prevented the stateAggregator.orgs.update
from catching the type error.
😢
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.
Mike fixed some typing elsewhere to prevent this from happening. I merged those in.
fix: update AuthFields type
see forcedotcom/cli#1598
@W-11358405@