From 0ed9fad78c6d2e4e0bff84665c3261b904b378df Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Sat, 26 Jan 2019 17:08:21 +0100 Subject: [PATCH] add output when creating channel using cli (#10138) * add output when creating channel using cli * update per feedback --- cmd/mattermost/commands/channel.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/mattermost/commands/channel.go b/cmd/mattermost/commands/channel.go index ff3e18af31..3da8ecc799 100644 --- a/cmd/mattermost/commands/channel.go +++ b/cmd/mattermost/commands/channel.go @@ -196,10 +196,14 @@ func createChannelCmdF(command *cobra.Command, args []string) error { CreatorId: "", } - if _, err := a.CreateChannel(channel, false); err != nil { - return err + createdChannel, errCreatedChannel := a.CreateChannel(channel, false) + if errCreatedChannel != nil { + return errCreatedChannel } + CommandPrettyPrintln("Id: " + createdChannel.Id) + CommandPrettyPrintln("Name: " + createdChannel.Name) + CommandPrettyPrintln("Display Name: " + createdChannel.DisplayName) return nil }