mc cp -continue: Fix escape/colorization of JSON (#3116)
This commit is contained in:
+3
-3
@@ -19,6 +19,7 @@ package cmd
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -30,7 +31,6 @@ import (
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/mc/pkg/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
)
|
||||
@@ -275,8 +275,8 @@ func doPrepareCopyURLs(session *sessionV8, trapCh <-chan bool, cancelCopy contex
|
||||
session.Delete()
|
||||
fatalIf(probe.NewError(e), "Unable to prepare URL for copying. Error in JSON marshaling.")
|
||||
}
|
||||
|
||||
fmt.Fprintln(dataFP, string(jsonData))
|
||||
dataFP.Write(jsonData)
|
||||
dataFP.Write([]byte{'\n'})
|
||||
if !globalQuiet && !globalJSON {
|
||||
scanBar(cpURLs.SourceContent.URL.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user