Open Clint-Chester opened 4 years ago
Hi Clint,
Took my a while figure this out, but the reason the quotes are not respected is because it is passed through multiple shells, each with their own rules for escaping strings. In the end the fix was simple. You have to add escape single qoutes around the variable enclosed in double qoutes.
args: 'force:source:deploy -c -l RunLocalTests -p ''"${{ env.files_to_deploy }}"'' -u ***
I am calling this directly as follows:
sfdx force:source:deploy -u [ORG] -p "force-app/main/default/layouts/Snapshot__mdt-Snapshot Layout.layout-meta.xml"
And using the escaped single quote method above didn't solve it for me. Any advice?
I would be glad to help, I've spent to much energy figuring out this mess myself. could you maybe share the entire file? (Redacted for privacy of course)
Issue
I am trying to use the force:source:deploy by providing a comma separated list of file paths in which some of the file names have spaces. However when passing the double quotes in the args, I'm getting sfdx errors with unrecognized file paths due to the file name being chopped off.
Steps to reproduce
The step below assumes that authentication, default user names and GitHub outputs have been setup correctly. The following is an example of the deploy step.
This is the files-to-deploy variable
Expected Outcome
Files deploy correctly to target environment. Confirmed this by doing a direct npm install with the sfdx-cli and not using the docker action.
Actual Outcome
Following is the output received.
If I'm passing in the arguments incorrectly that would be an ideal news story 😄 any help is greatly appreciated. Thanks!