Unexpected behavior with default SFDX target org configuration.


Question

When I omit the -u CLI flag and rely on the currently set default SFDX target org, I expect the tool to handle it. However, the tool returns a message saying this has not been supplied. Does SFDMU support using the default SFDX org?


Answer

No, SFDMU does not support using the default SFDX org set via the sfdx force:config:set defaultusername=<Alias_name> command. When you omit the -u or --targetusername, the --targetusername does not inherit from the default org specified.

To ensure SFDMU connects to your desired target org, you must explicitly provide -u with the sfdx sfdmu:run command. If you omit the -u flag, SFDMU will not return a runtime error, but will default to using csvfile as the target.

Last updated on 20th Apr 2024