From 1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Mon, 11 Jun 2018 15:48:32 +0100 Subject: MM-10684: Show logs on Slack Import CLI. (#8936) --- cmd/mattermost/commands/import.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/mattermost/commands/import.go b/cmd/mattermost/commands/import.go index 91cfaf997..8526ba6f8 100644 --- a/cmd/mattermost/commands/import.go +++ b/cmd/mattermost/commands/import.go @@ -74,9 +74,18 @@ func slackImportCmdF(command *cobra.Command, args []string) error { CommandPrettyPrintln("Running Slack Import. This may take a long time for large teams or teams with many messages.") - a.SlackImport(fileReader, fileInfo.Size(), team.Id) + importErr, log := a.SlackImport(fileReader, fileInfo.Size(), team.Id) + + if importErr != nil { + return err + } + + CommandPrettyPrintln("") + CommandPrintln(log.String()) + CommandPrettyPrintln("") CommandPrettyPrintln("Finished Slack Import.") + CommandPrettyPrintln("") return nil } -- cgit v1.2.3-1-g7c22