New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The sourcepath isn't escaped when the deploy is called #1
Comments
Although, reading up on escaping and node's exec, it seems like a problem lots if people are struggling with, naive escaping probably isn't the right answer after all. |
Thanks for reporting @anormanbmj! I just published a new version (0.0.6) with this fix in place. Seemed to be working fine when I tested out but let me know if it continues to be an issue. |
That does fix my particular issue, thank you for getting an update out so quickly. However it isn't a general fix, that code path will still break in some cases. For example if there is a single quote in the path, which is perfectly possible and valid on MacOS for example, then it will still break. There will also be other non alpha numeric characters that are going to break it. I also doubt that the single quote escaping is going to work cross platform in all cases. It has been a while since I did any Windows command line stuff, but I'm fairly sure you can't escape command line arguments with single quotes there. Sadly it doesn't look like there is a quick and easy solution to fix it fully. |
Oh I see your point. I think the file path I'm using from VS Code's API documentation: For special characters.. might just let that slide for now. I'm planning on deprecating the package once this feature is included in the Salesforce extension. I think it will be Spring GA. |
The extension doesn't escape the path that it passes to sfdx. If your path contains spaces the call to sfdx fails.
What it sends to sfdx:
sfdx force:source:deploy --sourcepath /Users/andy/Dropbox/clients/cpqstaging/CPQ Staging/force-app/main/default/classes/TestUtils.cls
What it should send to sfdx:
sfdx force:source:deploy --sourcepath '/Users/andy/Dropbox/clients/cpqstaging/CPQ Staging/force-app/main/default/classes/TestUtils.cls'
The text was updated successfully, but these errors were encountered: