chris-peterson / pwsh-gitlab

:computer: PowerShell module for GitLab
MIT License
22 stars 10 forks source link

Suppress bool object from returning in Get-LocalGitContext #19

Closed CaseyMacPherson closed 2 years ago

CaseyMacPherson commented 2 years ago

When executing Get-LocalGitlabContext it is returning a bool AND the context object. This results in non fatal error messages being displayed from other commands

Get-LocalGitContext

True

Site       Project                     Branch
----       -------                     ------
github.com CaseyMacPherson/pwsh-gitlab main

When using the command Set-GitlabMergeRequest alias MR the following output is observed. The table output isn't important, so the dots are just obfuscation ;)

Select-Object: Property "Branch" cannot be found.

  Id Author      Title         Url
  -- ------      -----        ---
  ..   ...            .....            .....

After this fix, True or False should no longer be observed in the output