-
Notifications
You must be signed in to change notification settings - Fork 236
Script arguments to debug adapter should be wrapped in quotes if they contain spaces #190
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
Comments
We have to be careful/smart about this. If you wrap I dunno on this one. Seems like it would be a bit dangerous to do this. Another solution would be to only support a single string and not an array of strings for |
Yeah, you're right, maybe we should just be accepting a single string. There's not really a good reason to accept an array of strings since it complicates everything. Maybe we can just change our schema in VS Code for now to specify |
Forgot to should add, we'd deprecate the array support after a version or two once we have appropriate documentation showing how to do args the right way. At the time of deprecation we could even give a specific error message from the debug adapter warning the user of this. |
Another somewhat lame option if we were to keep array of strings is to add more help in the scheme e.g.: The problem with this is that it isn't very likely users would hover over the My original thinking with array of args was that we would eventually crack the nut on AddCommand instead of AddScript (to avoid the script injection issue Lee talked about) then we would need the array of args. I'm not sure that will ever happen at this point. |
Yeah... I thought about that too. Though I think it's considered "more secure" to use AddCommand so I'd like to do it at some point. We may still be able to accomplish this with a single string by using PowerShell's parser to get an AST for the string to use for passing to AddParameter/AddArgument. |
See the following two issues for more information.
microsoft/vscode#4057
PowerShell/vscode-powershell#117
The text was updated successfully, but these errors were encountered: