Unexpected behavior when relying on the default target org configuration within SFDX.


Question.

When omitting the -u CLI flag and using the currently set default SFDX target org I would expect the tool to handle, although the tool will then return a message saying this has not been supplied.

Does the SFDMU support default SFDX org ?


Answer:

No, it's not supported by SFDMU.

When you omit -u or --targetusername, the --targetusername is not getting taken from the default org specified globally by the sfdx force:config:set defaultusername=

So:

  • To get SFDMU connected to your desired target org, you must explicitly provide -u with the sfdx sfdmu:run command
  • If you still decide to omit the -u flag, it will not cause runtime error, but the SFDMU will automatically set csvfile as the Target.
Last updated on 29th Jan 2023