You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the works of ArgumentStringHandler.ToStringAndClear() which basically concludes: If there are only quotes at the start and at the end, then they can be safely removed, which is rubbish if there is a space in between.
Usage Information
9.0.3 / 8.0.11 / net8 / Windows 11
Description
If you declare a tool that takes a directory as its only argument and that directory contains spaces, ArgumentStringHandler will not quote the path.
Reproduction Steps
Add this test to ArgumentStringHandlerTest:
Expected Behavior
string path = "C:/Program Files";
MyTool($"{path}");
should call:
path_to_tool/MyTool.exe "C:/Program Files"
Actual Behavior
no quotes:
path_to_tool/MyTool.exe C:/Program Files
Regression?
7.0.2 on net6 did not do this
Known Workarounds
Adding a space at the end seems to help:
MyTool($"{path} ");
Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered: