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 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.
<PostInstallScript>
statement
statement
if [ cond ]; then
statement
fi
</PostInstallScript>
should strip
the first line break and any whitespace leading up to it (right after )
"shared whitespace" of all statements (i.e. the first three spaces of each line)
any trailing whitespace of any line
the final line break and any whitespace leading up to it and after it
The text was updated successfully, but these errors were encountered:
Regarding CRLF/LF, we can/should probably do a string.Replace to 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:
Just wrapping the PostInstallScript contents in a CDATA element, like this:
<PostInstallScript><![CDATA[statementstatementif [ cond ]; then statementfi]]></PostInstallScript>
Instead of inlining the script in the .csproj file, sourcing it from another file (e.g. <PostInstallScript Path="myfile.sh"/>)?
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.
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
The text was updated successfully, but these errors were encountered: