-
Notifications
You must be signed in to change notification settings - Fork 405
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 create command to sf style #5295
Conversation
…dotcom/salesforcedx-vscode into cristi/w-14700670/org-create-to-sf
|
||
public withJson(): CommandBuilder { | ||
public withJson(logLevel: boolean = true): CommandBuilder { | ||
this.args.push('--json'); | ||
this.args.push('--loglevel', 'fatal'); | ||
if (logLevel) { | ||
this.args.push('--loglevel', 'fatal'); | ||
} |
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.
Since we are now using the SF_LOG_LEVEL
environment variable instead of the deprecated --loglevel
flag, is this change necessary? Or is it ok to just take out the --loglevel
flag entirely?
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.
that flag is still used in other commands, so I'd keep it until the very last moment when we actually change from sfdx to sf or when no other commands are left to be transitioned
.withArg('org:create:scratch') | ||
.withFlag('--definition-file', `${scratchDefFilePath}`) | ||
.withArg('--set-default') | ||
.withJson(false) |
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.
Why don't we want JSON anymore?
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.
we want it, the false is just to evaluate the addition of --loglevel
const createCommand = forceOrgCreateBuilder.build({ | ||
file: path.join(workspaceUtils.getRootWorkspacePath(), CONFIG_FILE), | ||
alias: TEST_ALIAS, | ||
expirationDays: TEST_ORG_EXPIRATION_DAYS | ||
}); | ||
expect(createCommand.toCommand()).to.equal( | ||
`sfdx force:org:create -f ${CONFIG_FILE} --setalias ${TEST_ALIAS} --durationdays ${TEST_ORG_EXPIRATION_DAYS} --setdefaultusername --json --loglevel fatal` | ||
`sfdx org:create:scratch --definition-file ${CONFIG_FILE} --alias ${TEST_ALIAS} --duration-days ${TEST_ORG_EXPIRATION_DAYS} --set-default --json` |
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.
This command uses JSON, which is why I'm asking about .withJson(false)
in the other command.
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.
Approved! 🎉
SFDX: Create a Default Scratch Org
✅
* fix: org create commands to sf style * chore: loglevel flag to SF_LOG_LEVEL env var * chore: loglevel * chore: -f to --definition-file * chore: conflict after conflict resolution * chore: conflict after conflict resolution * chore: weird file
* fix: suppress warning for apex w/no coverage @W-10288513@ * chore: wip * chore: wip * chore: extract colorize for testability * chore: more optimizations * fix: org create command to sf style (#5295) * fix: org create commands to sf style * chore: loglevel flag to SF_LOG_LEVEL env var * chore: loglevel * chore: -f to --definition-file * chore: conflict after conflict resolution * chore: conflict after conflict resolution * chore: weird file * fix: correct log file name formatting error (#5316) @ W-13682486@ fix logfile name formatting error ensure the directory to the logfiles is present * chore: update to version 59.12.1 * chore: generated CHANGELOG for release/v59.12.1 * chore: update changelog * chore: update changelog * chore: update changelog * chore: update changelog * chore: updated SHA256 v59.12.1 [skip ci] * chore: wrong commands in package.json (#5317) * chore: update to version 59.12.2 * chore: generated CHANGELOG for release/v59.12.2 * chore: update changelog * chore: updated SHA256 v59.12.2 [skip ci] * fix: default SF_LOG_LEVEL to fatal (#5318) * chore: fix merge of develop * chore: add setting to control ui warnings Added a setting that allows user to disable coverage warning ui * chore: handle coverage exception in central spot Pass all coverage exception through single handler * chore: tweak exception handler for colorizer * Update packages/salesforcedx-vscode-apex/package.nls.json Co-authored-by: Daphne Yang <[email protected]> * chore: remove extra space --------- Co-authored-by: Cristina Cañizales <[email protected]> Co-authored-by: Release Bot <[email protected]> Co-authored-by: Daphne Yang <[email protected]> Co-authored-by: Daphne Yang <[email protected]>
What does this PR do?
What issues does this PR fix or reference?
@W-14700670@
Functionality Before
Functionality After