diff options
author | George Goldberg <george@gberg.me> | 2018-06-11 15:48:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 15:48:32 +0100 |
commit | 1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582 (patch) | |
tree | dfe14ecc4b2f36626334702d7c20fd0024dd1097 /cmd/mattermost | |
parent | e10665a5a53f44530b4d8381fd5c815030634b5e (diff) | |
download | chat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.tar.gz chat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.tar.bz2 chat-1b821c7319ccfa153d1bc9a8ffb3f07d3c3a4582.zip |
MM-10684: Show logs on Slack Import CLI. (#8936)
Diffstat (limited to 'cmd/mattermost')
-rw-r--r-- | cmd/mattermost/commands/import.go | 11 |
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 } |