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
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.
The text was updated successfully, but these errors were encountered:
…,}`. Issue #7
* gnt.bat now uses safe logic for work with special symbols from `-msbuild` key.
* And main logic just ignores `;` only when `|` is found.
* Also fixes .packer for new logic with "|" and just adds .compressor from DllExport project.
Okay, I fully reviewed processing with special symbols like ' &!~`@#$^(+)_=%-; o_o also for GetNuTool
So... now it should be ok even without hacks like it was in DllExport manager, e.g.:
REM :: gnt's requirements (1.6.2 and less)REM set "_gntC=!_gntC:&=%%E_CARET%%&!"
But what about ;:
Finally, I implemented item4 from the possible ways, that means usage as an delimiter only when the | is not found.
The way for escaping ; -> ;; is fully compatible with this, but I don't want to add about ~+0.5Kb of duplicated logic, because of |. That is, just think about | like about escape character for ;
* NEW: New logic to specify multiple packages and config files via delimiters.
Now main core just ignores `;` when `|` is found.
#7 (comment)
Read the documentation.
* FIXED: Fixed problems with special symbols in path. Issue #7
```
' &!~`@#$^(+)_=%-;[.]{,}
```
* CHANGED: Batch version now uses safe logic for work with special symbols from `-msbuild` key.
* CHANGED: Fully updated compression for generating more lightweight distribution.
Useful for projects like DllExport, hMSBuild, and so on.
New way for argument passing into the main core.
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.
The text was updated successfully, but these errors were encountered: