Skip to content

Commit

Permalink
fix: usesf flag accepts 'true' and 'false' and 'true' by default
Browse files Browse the repository at this point in the history
  • Loading branch information
hknokh2 committed Mar 3, 2024
1 parent 5aab94d commit f311b21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion messages/run.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"errorMissingRequiredFlag": "Missing required flag(s): %s",

"useSfFlagDescription": "[Optional] Enables the usage of modern Salesforce CLI (sf-cli) commands instead of deprecated Salesforce DX CLI (sfdx-cli) commands.",
"useSfLongFlagDescription": "[Optional] If provided, forces the Plugin to use the latest Salesforce CLI (sf-cli) commands instead of Salesforce DX CLI (sfdx-cli) commands for deprecated commands. For example, it will use sf org display instead of sfdx force:org:display.",
"useSfLongFlagDescription": "[Optional] If set to 'true', forces the Plugin to use the latest Salesforce CLI (sf-cli) commands instead of Salesforce DX CLI (sfdx-cli) commands for deprecated commands. For example, it will use sf org display instead of sfdx force:org:display. Setting this flag to 'false' will force the Plugin to use the deprecated Salesforce DX CLI (sfdx-cli) commands. If not set, the Plugin will use the latest Salesforce CLI (sf-cli) commands by default. This flag is useful when you have both Salesforce CLI (sf-cli) and Salesforce DX CLI (sfdx-cli) installed and you want to force the Plugin to use a specific CLI.",

"logfullqueryFlagDescription": "[Optional] Enables logging of full SOQL queries",
"logfullqueryLongFlagDescription": "[Optional] If provided, the command will log full SOQL queries instead of short versions."
Expand Down
7 changes: 4 additions & 3 deletions src/commands/sfdmu/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,15 @@ export default class Run extends SfdxCommand implements IRunProcess {
default: 'trace',
options: ['info', 'debug', 'warn', 'error', 'fatal', 'trace', 'INFO', 'DEBUG', 'WARN', 'ERROR', 'FATAL', 'TRACE']
}),
usesf: flags.boolean({
usesf: flags.string({
description: commandMessages.getMessage("useSfFlagDescription"),
longDescription: commandMessages.getMessage("useSfLongFlagDescription"),
default: true
default: "true",
options: ['true', 'false', 'TRUE', 'FALSE']
}),
logfullquery: flags.boolean({
description: commandMessages.getMessage("logfullqueryFlagDescription"),
longDescription: commandMessages.getMessage("logfullqueryLongFlagDescription")
longDescription: commandMessages.getMessage("logfullqueryLo0ngFlagDescription")
}),
};

Expand Down
2 changes: 1 addition & 1 deletion src/modules/commands_processors/runCommandExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class RunCommandExecutor {
runProcess.m_flags.canmodify,
runProcess.m_flags.simulation,
runProcess.exportJson,
runProcess.m_flags.usesf,
runProcess.m_flags.usesf == "true",
runProcess.m_flags.logfullquery
);

Expand Down

0 comments on commit f311b21

Please sign in to comment.