mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add newline on download progress failure
This commit is contained in:
parent
8e791f7e8b
commit
36ecbb0cd7
2 changed files with 10 additions and 0 deletions
|
|
@ -274,6 +274,11 @@ func archiveInfo(info formatInformation, writeCloser io.WriteCloser, filename st
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error while setting up downloader: %v", err)
|
return fmt.Errorf("error while setting up downloader: %v", err)
|
||||||
}
|
}
|
||||||
|
defer func() {
|
||||||
|
if downloadProgress.Total != downloadProgress.Current {
|
||||||
|
fmt.Println()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
rootFile, err := os.CreateTemp("", fmt.Sprintf("%s_*.ts", strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))))
|
rootFile, err := os.CreateTemp("", fmt.Sprintf("%s_*.ts", strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,11 @@ func downloadInfo(info formatInformation, file *os.File) error {
|
||||||
if out.IsDev() {
|
if out.IsDev() {
|
||||||
downloadProgress.Prefix = out.DebugLog.Prefix()
|
downloadProgress.Prefix = out.DebugLog.Prefix()
|
||||||
}
|
}
|
||||||
|
defer func() {
|
||||||
|
if downloadProgress.Total != downloadProgress.Current {
|
||||||
|
fmt.Println()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue