Skip to content

Commit

Permalink
Merge pull request #1048 from github/timrogers/fix-1033-v2
Browse files Browse the repository at this point in the history
Fix recommended follow-up commands outputted to the logs by statically setting the root command for each CLI
  • Loading branch information
timrogers authored Jul 3, 2023
2 parents 206794a + 45553a8 commit 004699a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@

- Fix recommended `gh gei`, `gh bbs2gh` and `gh ado2gh` commands in log output
2 changes: 1 addition & 1 deletion src/ado2gh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private static void WarnIfNotUsingExtension()

private static void SetContext(ParseResult parseResult)
{
CliContext.RootCommand = parseResult.RootCommandResult.Command.Name;
CliContext.RootCommand = "ado2gh";
CliContext.ExecutingCommand = parseResult.CommandResult.Command.Name;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bbs2gh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static async Task Main(string[] args)

private static void SetContext(InvocationContext context)
{
CliContext.RootCommand = context.ParseResult.RootCommandResult.Command.Name;
CliContext.RootCommand = "bbs2gh";
CliContext.ExecutingCommand = context.ParseResult.CommandResult.Command.Name;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gei/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static async Task Main(string[] args)

private static void SetContext(ParseResult parseResult)
{
CliContext.RootCommand = parseResult.RootCommandResult.Command.Name;
CliContext.RootCommand = "gei";
CliContext.ExecutingCommand = parseResult.CommandResult.Command.Name;
}

Expand Down

0 comments on commit 004699a

Please sign in to comment.