ctaggart / SourceLink

Source Code On Demand
MIT License
356 stars 55 forks source link

Disable CommandLine #318

Closed TheAngryByrd closed 6 years ago

TheAngryByrd commented 6 years ago

I recently added SourceLink.Create.CommandLine to MiniScaffold but I'm running into an issue. dotnet pack fails if there has been no git repo initialized or git remote set. Is there a way to disable sourcelink if there isn't a git repo yet or a mode to just throw warnings instead of failing?

I know this is a weird use case.

https://github.com/TheAngryByrd/MiniScaffold/issues/36

ctaggart commented 6 years ago

You can disable it bye setting /p:SourceLinkCreate=false. That property is false by default locally, but set to true on CI servers like AppVeyor.

https://github.com/ctaggart/SourceLink/blob/master/SourceLink.Create.CommandLine/SourceLink.Create.CommandLine.targets#L12

TheAngryByrd commented 6 years ago

Awesome I'll give that a try. Sorry for not RTFMing hard enough.