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: org list now lists all scratch orgs properly #359

Merged
merged 3 commits into from
Jul 28, 2022
Merged

Conversation

peternhale
Copy link
Contributor

@peternhale peternhale commented Jul 28, 2022

What does this PR do?

Fixes the path when reading user json file when the org is referenced in a 00D file.

What issues does this PR fix or reference?

@W-11507149@
forcedotcom/cli#1641

@peternhale peternhale requested a review from mshanemc July 28, 2022 16:30
const orgFileContent = JSON.parse(
await fs.readFile(join(Global.SFDX_STATE_FOLDER, orgFileName), 'utf8')
) as { usernames: string[] };
const orgFileContent = JSON.parse(await fs.readFile(join(Global.SFDX_DIR, orgFileName), 'utf8')) as {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Global.SFDX_STATE_FOLDER is a const, where Global.SFDX_DIR is a getter that resolved the state folder path. The cost was causing all reads to fail with file not found.

@mshanemc
Copy link
Contributor

QA notes:
✅ repro of bug (requires user:create) on existing plugin
✅ missing username appears when using this branch

@mshanemc mshanemc merged commit adaf8ab into main Jul 28, 2022
@mshanemc mshanemc deleted the phale/W-11507149 branch July 28, 2022 17:00
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.

3 participants