GitTools/GitReleaseManager

Exception thrown when running GRM on AppVeyor

Closed this issue · 0 comments

gep13 commented

Description

Unable to run GRM on AppVeyor (suspect other CI platforms to also suffer from same problem). Attempting to do so results in a The handle is invalid exception

Expected Behavior

GRM runs correctly

Actual Behavior

Cake.exe : [FTL] The handle is invalid.
At line:1 char:1
+ & "C:\projects\gitreleasemanager\tools\Cake\Cake.exe" "recipe.cake" - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: ([FTL] The handle is invalid.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
System.IO.IOException: The handle is invalid.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at System.Conso
le.get_WindowWidth()
   at GitReleaseManager.Cli.Program.CreateFiglet(BaseSubOptions options)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at GitReleaseManager.Cli.Program.<Main>d__3.MoveNext()
An error occurred when executing task '
Publish-GitHub-Release
'.

Possible Fix

Use try/catch to handle Console.WindowWidth which is throwing the exception.

Steps to Reproduce

Run this build:
https://ci.appveyor.com/project/GitTools/gitreleasemanager/builds/30086169

Context

Unable to fully publish GRM release.