tvx/extract: print confirmation.

This commit is contained in:
Raúl Kripalani 2020-09-27 20:30:32 +01:00
parent e5c56da321
commit a712c109d8

View File

@ -48,7 +48,7 @@ var extractCmd = &cli.Command{
&cli.StringFlag{
Name: "id",
Usage: "identifier to name this test vector with",
Value: "<undefined>",
Value: "(undefined)",
Destination: &extractFlags.id,
},
&cli.StringFlag{
@ -297,12 +297,13 @@ func runExtract(_ *cli.Context) error {
}
output := io.WriteCloser(os.Stdout)
if extractFlags.file != "" {
output, err = os.Create(extractFlags.file)
if file := extractFlags.file; file != "" {
output, err = os.Create(file)
if err != nil {
return err
}
defer output.Close()
defer log.Printf("wrote test vector to file: %s", file)
}
enc := json.NewEncoder(output)