我正在运行管道,执行一个简单的任务来安装 git 并通过以下命令检查版本tasks。
一切都运行良好,直到我使用相同的 yaml 文件创建另一个临时管道以进行一些额外的测试和开发。
我没有对 yaml 文件进行任何更改,该文件仍然以绿色运行,具有相同的任务。
但是新管道中的执行任务失败并出现“意外”错误
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: "5.10.x"
- task: gitversion/execute@0
displayName: Determine Version
inputs:
useConfigFile: true
configFilePath: ./gitversion.yml
Run Code Online (Sandbox Code Playgroud)
输出如下所示:
Command: dotnet-gitversion /agent/_work/26/s /output json /output buildserver /config /agent/_work/26/s/gitversion.yml
/opt/hostedtoolcache/GitVersion.Tool/5.10.3/x64/dotnet-gitversion /agent/_work/26/s /output json /output buildserver /config /agent/_work/26/s/gitversion.yml
ERROR [09/20/22 12:54:22:24] An unexpected error occurred:
System.NullReferenceException: Object reference not set to an instance of an object.
at LibGit2Sharp.Core.Handles.ObjectHandle.op_Implicit(ObjectHandle handle) in /_/LibGit2Sharp/Core/Handles/Objects.cs:line 509
at LibGit2Sharp.Core.Proxy.git_commit_author(ObjectHandle obj) in /_/LibGit2Sharp/Core/Proxy.cs:line …Run Code Online (Sandbox Code Playgroud)