mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-04-27 00:23:02 +00:00
Pre/Post Install scripts need to have LF line endings #33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @clemensv on GitHub (Sep 4, 2018).
The install scripts lifted from the XML build info need to have LF endings. Currently, CRLF from Windows authors csproj gets carried over and causes syntax errors
The conversion should also strip trailing/leading whitespace that's an artifact of XML formatting, e.g.
should strip
@qmfrederik commented on GitHub (Sep 4, 2018):
Regarding CRLF/LF, we can/should probably do a
string.Replaceto always normalize to LF.On the other hand, regarding whitespace, I have a feeling that doing too much 'magic' (like removing 'shared whitespace') can have unintended side-effects.
What about:
CDATAelement, like this:.csprojfile, sourcing it from another file (e.g.<PostInstallScript Path="myfile.sh"/>)?@clemensv commented on GitHub (Sep 5, 2018):
I like sourcing from another file best. That's what I effectively resort to now by including a script and calling it. The step should ideally copy the content but not require the file to be included in the output.