Skip to main content

I believe I am having an issue with the source:retrieve command.

 

I have a sfdx-project.json file like the following:

 

{

  "packageDirectories": [

    {

      "path": "force-app",

      "default": true

    },

    {

      "path": "myApp",

      "default": false

    }

  ],

  "namespace": "",

  "sfdcLoginUrl": "https://test.salesforce.com",

  "sourceApiVersion": "45.0"

}

 

For this scenario lets say I am interested in retrieving a class that is currently in /myApp/main/default/classes/ called MyApexClass.cls.

 

I get what I expect when I use the command like either of the following:

  • sfdx force:source:retrieve -x manifest/package.xml
  • sfdx force:source:retrieve -m ApexClass:MyApexClass

The MyApexClass.cls file which is originally located in /myApp/main/default/classes/ is updated in that location.

 

However I get a different behavior when I use the command like the following:

  • sfdx force:source:retrieve -p ./myApp/main/default/classes/MyApexClass.cls

The MyApexClass.cls file is retrieved, but instead of updating the copy in /myApp/main/default/classes/, a copy of the class is put into /force-app/main/default/classes/.

 

I expect all three ways of running source:retrieve to behave similarly. I expect the file to be placed into the location it was originally.

댓글 2개
0/9000