summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-06-11 15:48:32 +0100
committerGitHub <noreply@github.com>2018-06-11 15:48:32 +0100
commit1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582 (patch)
treedfe14ecc4b2f36626334702d7c20fd0024dd1097 /cmd
parente10665a5a53f44530b4d8381fd5c815030634b5e (diff)
downloadchat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.tar.gz
chat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.tar.bz2
chat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.zip
MM-10684: Show logs on Slack Import CLI. (#8936)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mattermost/commands/import.go11
1 files changed, 10 insertions, 1 deletions
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
}