Skip to content

Commit d40ab65

Browse files
authored
chore: add downlod started/finished to the terminal output
Signed-off-by: Jabar Asadi <azhovan@outlook.com>
1 parent 814c788 commit d40ab65

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cmd/download.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ func newDownloadCmd(output io.Writer) *cobra.Command {
4242
}
4343

4444
dm := download.NewDownloadManager(downloader, download.DefaultRetryPolicy())
45-
return dm.Download(
46-
cmd.Context(),
47-
download.WithSegmentSize(opts.segSize),
48-
download.WithNumberOfSegments(opts.segCount),
49-
)
45+
46+
fmt.Println("Downloading ...")
47+
err = dm.Download(cmd.Context(), download.WithSegmentSize(opts.segSize), download.WithNumberOfSegments(opts.segCount))
48+
if err != nil {
49+
return err
50+
}
51+
fmt.Println("Download completed.")
52+
53+
return nil
5054
},
5155
}
5256

0 commit comments

Comments
 (0)