brianedwardsaunders / sfdx-ext

sfdx extension
MIT License
15 stars 5 forks source link

Spaces in org alias name causes retrieve command to fail #7

Open slaght opened 1 month ago

slaght commented 1 month ago

Running a simple retrieve command (sfdx ext:mdapi:retrieve -y Report -u Dev 02) will fail when the script uses the metadata API to retrieve the generated package:

$ sfdx ext:mdapi:retrieve -y Report -u "Dev 02"
-----------------------------
sfdx ext:mdapi:retrieve
-----------------------------
targetusername           : Dev 02
apiversion               : 62.0
ignorebackup             : false
ignoreinstalled          : false
ignorenamespaces         : false
ignorehidden             : false
ignorefolders            : false
ignorestaticresources    : false
manifestonly             : false
retrievemode             : dev
split                    : false
createcsv                : false
startswithfilters        : null
containsfilters          : null
endswithfilters          : null
matchfilters             : null
includetypes             : Report
excludestartswithfilters : null
excludecontainsfilters   : null
excludeendswithfilters   : null
excludematchfilters      : null
excludetypes             : null
-----------------------------
staging alias stage/Dev 02 directory created
initialising... done
describe metadata... done
CLIError: timed out
    at error (C:\Users\d-brandon.slaght\AppData\Local\sf\client\2.61.8-ec7097b\node_modules\@oclif\core\lib\errors\error.js:34:15)
    at C:\Users\d-brandon.slaght\AppData\Local\sf\client\2.61.8-ec7097b\node_modules\@oclif\core\lib\flush.js:13:73
    at async flush (C:\Users\d-brandon.slaght\AppData\Local\sf\client\2.61.8-ec7097b\node_modules\@oclif\core\lib\flush.js:25:5) {
  code: undefined,
  oclif: { exit: 1 },
  skipOclifErrorHandling: undefined,
  suggestions: undefined
}
list metadata... done
list folders... done
ignoring person accounts not activated in org
resolve personaccount recordtypes... done    
created manifest directory: stage/Dev 02/manifest
create manifest file(s)... done
copied package.xml file
refreshing retrieve directory: stage/Dev 02/retrieved
retrieve directory created
Warning: This command is deprecated and will be removed from Salesforce CLI on November 6, 2024. Use the "project retrieve start" command instead.
Error (2): Unexpected arguments: 02/manifest/package.xml, 02/retrieved, 02
See more help with --help

Try this:

--unpackaged "stage/Dev 02/manifest/package.xml"
--retrievetargetdir "stage/Dev 02/retrieved"
--target-org "Dev 02"

Error: Command failed: sfdx force:mdapi:retrieve -s -k stage/Dev 02/manifest/package.xml -r stage/Dev 02/retrieved -w -1 -u Dev 02
brianedwardsaunders commented 1 month ago

Hi

Project is not longer supported or maintained you may want to consider

https://github.com/dxatscale/sfpowerscripts

Regards

On Fri, 11 Oct 2024, 22:21 Brandon Slaght, @.***> wrote:

Running a simple retrieve command (sfdx ext:mdapi:retrieve -y Report -u Dev 02) will fail when the script uses the metadata API to retrieve the generated package:

$ sfdx ext:mdapi:retrieve -y Report -u "Dev 02"

sfdx ext:mdapi:retrieve

targetusername : Dev 02 apiversion : 62.0 ignorebackup : false ignoreinstalled : false ignorenamespaces : false ignorehidden : false ignorefolders : false ignorestaticresources : false manifestonly : false retrievemode : dev split : false createcsv : false startswithfilters : null containsfilters : null endswithfilters : null matchfilters : null includetypes : Report excludestartswithfilters : null excludecontainsfilters : null excludeendswithfilters : null excludematchfilters : null excludetypes : null

staging alias stage/Dev 02 directory created initialising... done describe metadata... done CLIError: timed out at error @.\core\lib\errors\error.js:34:15) at @.\core\lib\flush.js:13:73 at async flush @.***\core\lib\flush.js:25:5) { code: undefined, oclif: { exit: 1 }, skipOclifErrorHandling: undefined, suggestions: undefined } list metadata... done list folders... done ignoring person accounts not activated in org resolve personaccount recordtypes... done created manifest directory: stage/Dev 02/manifest create manifest file(s)... done copied package.xml file refreshing retrieve directory: stage/Dev 02/retrieved retrieve directory created Warning: This command is deprecated and will be removed from Salesforce CLI on November 6, 2024. Use the "project retrieve start" command instead. Error (2): Unexpected arguments: 02/manifest/package.xml, 02/retrieved, 02 See more help with --help

Try this:

--unpackaged "stage/Dev 02/manifest/package.xml" --retrievetargetdir "stage/Dev 02/retrieved" --target-org "Dev 02"

Error: Command failed: sfdx force:mdapi:retrieve -s -k stage/Dev 02/manifest/package.xml -r stage/Dev 02/retrieved -w -1 -u Dev 02

— Reply to this email directly, view it on GitHub https://github.com/brianedwardsaunders/sfdx-ext/issues/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7TR3D7RBIZED6XLNGY5J3Z3A6NXAVCNFSM6AAAAABPZVC6TOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DEMRQGE2TOMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>