So... it continues 3F/DllExport#88 (comment)
The following possible chars in paths ' &!~`@#$^(+)_=%-;[.]{,} may cause some problems for use in third party components, however this is still possible to escape all of this. See this changes: 3F/DllExport@d4b46cd
But looks like not for ;
Initially GetNuTool (2015) uses same compilation of list of packages for different types:
- packages.config file that was designed for compatibility with original NuGet clients. (today's nuget have priorities for PackageReference only). But anyway, I personally used mostly command-line arguments instead of this. So I'm not sure about the future of this file also for current project. But this is other story.
- Env and msbuild properties via something like
set ngpackages=... or /p:ngpackages="..." ...
Both of this encodes same syntax like:
id[/version][:output]|id2[/version][:output]|...
id[/version][:output];id2[/version][:output];... (; introduced in 1.6 because | requires escaping in some places for batch scripts)
But while | requires escaping in command-line usage, the truth is that this never be allowed in path in windows.
Okay, what we have today:
- id/1.6.0:output;id2;id3:output
- id/1.6.0:output|id2|id3:output
Where output may contain absolute path like id/1.6.0:D:\dir\name\;... (it's also ok for latest versions).
Thus, for current stage we need to support only ; without changing syntax as possible for both cases above.
The possible way
💡 Escaping ; -> ;;.
- This is not so good option when this is used through variables, e.g.:
-
id/1.6.0:out;;put;id2;id3:%dir:;=;;%
💡 Leave only |.
- It may require escaping like ^| as I said above. And for some usage it may also require escape
^ too, e.g.:
-
id/1.6.0:output^|id2^|id3:withcaret^^|
-
id/1.6.0:output^^|id2^^|id3:withcaret^^^^|
💡 Empty delimiter ;. This is vice versa logic to first variant. When is empty data ;; like nothing to be parsed:
id/1.6.0:out;put;;id2;id3:%dir%;; a single ; after id2 because it should be only when ':' is presented.
- Too hard in implementing because of possible double semicolon in path, like "my;;name"
💡 Ignore ; only when | is found from ::
id/1.6.0:output;id2;id3:%dir%
id/1.6.0:out;put|id2;id3:%dir%|
id/1.6.0:out;put^|id2;id3:%dir%^| ....
💡 All above.
Need to think.
feedback
Anyone who also uses this directly as a tool (i.e. not as dependencies from 3rd projects), please leave here your comment.
So... it continues 3F/DllExport#88 (comment)
The following possible chars in paths
' &!~`@#$^(+)_=%-;[.]{,}may cause some problems for use in third party components, however this is still possible to escape all of this. See this changes: 3F/DllExport@d4b46cdBut looks like not for
;Initially GetNuTool (2015) uses same compilation of list of packages for different types:
set ngpackages=...or/p:ngpackages="..."...Both of this encodes same syntax like:
id[/version][:output]|id2[/version][:output]|...id[/version][:output];id2[/version][:output];...(;introduced in 1.6 because|requires escaping in some places for batch scripts)But while
|requires escaping in command-line usage, the truth is that this never be allowed in path in windows.Okay, what we have today:
Where output may contain absolute path like
id/1.6.0:D:\dir\name\;...(it's also ok for latest versions).Thus, for current stage we need to support only
;without changing syntax as possible for both cases above.The possible way
💡 Escaping
;->;;.id/1.6.0:out;;put;id2;id3:%dir:;=;;%💡 Leave only
|.^too, e.g.:id/1.6.0:output^|id2^|id3:withcaret^^|id/1.6.0:output^^|id2^^|id3:withcaret^^^^|💡 Empty delimiter;. This is vice versa logic to first variant. When is empty data;;like nothing to be parsed:id/1.6.0:out;put;;id2;id3:%dir%;;a single;after id2 because it should be only when ':' is presented.💡 Ignore
;only when|is found from::id/1.6.0:output;id2;id3:%dir%id/1.6.0:out;put|id2;id3:%dir%|id/1.6.0:out;put^|id2;id3:%dir%^|....💡 All above.
Need to think.
feedback
Anyone who also uses this directly as a tool (i.e. not as dependencies from 3rd projects), please leave here your comment.