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
When GitInfo generates ThisAssembly.GitInfo.g.cs, it does not escape backslashes in the RepositoryUrl field. Backslashes can appear in a remote URL if someone clones a local repository on Windows.
Please consider escaping those backslashes, or if that's not possible set RepositoryUrl to an empty sting so that the build will not fail.
Steps to reproduce:
This can be reproduced simply by setting the remote url in git to a string with backslashes. For instance, in Windows CMD:
git remote set-url origin C:\foo
But for a "real-world" scenario, you can use the following:
When GitInfo generates
ThisAssembly.GitInfo.g.cs
, it does not escape backslashes in theRepositoryUrl
field. Backslashes can appear in a remote URL if someone clones a local repository on Windows.Please consider escaping those backslashes, or if that's not possible set RepositoryUrl to an empty sting so that the build will not fail.
Steps to reproduce:
This can be reproduced simply by setting the remote url in git to a string with backslashes. For instance, in Windows CMD:
But for a "real-world" scenario, you can use the following:
C:\GitInfoTest
)git clone C:\GitInfoTest C:\GitInfoTestClone
)Expected results:
The solution should build.
The RepositoryUrl (which the program will print) should be
C:\GitInfoTest
. An empty string would also be acceptable, though less desirable.Actual results:
The solution fails to build with:
The problem is line 43 of
ThisAssembly.GitInfo.g.cs
, where the remote "url" is not properly string-escaped:The text was updated successfully, but these errors were encountered: