Describe the bug
dotnet tool run dotnet-gitversion /verbosity Diagnostic command doesn't produce _any_ output.
It should produce a json output
Does nothing. No errors, no output
You can reproduce it here:
https://labs.play-with-docker.com/p/bqq0t0qosm4g0090ih90#bqq0t0qo_bqq0t2iosm4g0090iha0
docker pull mcr.microsoft.com/dotnet/core/sdk:3.1
docker run -i -t mcr.microsoft.com/dotnet/core/sdk:3.1
mkdir x
cd x
dotnet new tool-manifest
dotnet tool install --local GitVersion.Tool --version 5.3.2
git init
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add .config/dotnet-tools.json
git commit -m "First"
dotnet tool run dotnet-gitversion /verbosity Diagnostic
Docker image dotnet/core/sdk:3.1
I'm unable to reproduce on macOS, so this may be a Debian-related issue. I believe Debian isn't fully supported, due to LibGit2Sharp not fully supporting it. Are you up to date on the details there, @arturcic?
https://github.com/libgit2/libgit2sharp/issues/1725 - the Debian 10 is not supported by LibGit2Sharp,
Indeed, I tried mcr.microsoft.com/dotnet/core/sdk:3.1-alpine and it works.
Is it possible to throw an exception (e.g. System not supported, or a libgit2sharp exception)?
So that users aware of why the output is empty?
It would be great to do something like that, @nZeus. But it sounds like a PITA to maintain a list of supported operating systems for another software project. If LibGit2Sharp had a list we could use, this would be no problem. But unfortunately they don't afaik.
@asbjornu I understand that it would be a PITA to maintain a perfect list but maintaining a list that contains the OS that you know will fail could save a lot of times to others.
As said in https://github.com/GitTools/GitVersion/issues/2308, we spend about two days (total) trying to find out what was going wrong. We were migrating all our code and build to .net core 3.1 when we had this problem. Narrowing down the error took us a lot of time.
Sure, I wouldn't mind having a blacklist of known unsupported operating systems. If anyone submits a pull request implementing it, I would merge it.
Most helpful comment
https://github.com/libgit2/libgit2sharp/issues/1725 - the Debian 10 is not supported by LibGit2Sharp,