Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion download.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func newDownloadCmd() *cobra.Command {
Short: "Download a Linux image to the specified path",
Args: cobra.ExactArgs(1),
Example: " " + os.Args[0] + " download latest\n" +
" " + os.Args[0] + " download 20251024-412\n" +
" " + os.Args[0] + " download latest --dest-dir /tmp\n",
Run: func(cmd *cobra.Command, args []string) {
runDownloadCommand(cmd.Context(), args, destDir)
Expand All @@ -52,8 +53,10 @@ func runDownloadCommand(ctx context.Context, args []string, destDir string) {
}

client := updater.NewClient()
_, _, err := updater.DownloadImage(ctx, client, targetVersion, nil, true, downloadPath)
downloadPath, _, err := updater.DownloadImage(ctx, client, targetVersion, nil, true, downloadPath)
if err != nil {
feedback.Fatal(i18n.Tr("error downloading the image: %v", err), feedback.ErrBadArgument)
}
pathAbs, _ := downloadPath.Abs()
feedback.Print(i18n.Tr("\nDebian image successfully downloaded: %s", pathAbs.String()))
}
2 changes: 0 additions & 2 deletions updater/download_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ func DownloadImage(ctx context.Context, client *Client, targetVersion string, up
return nil, "", fmt.Errorf("bad hash: %x (expected %x)", s, sha256Byte)
}

feedback.Print(i18n.Tr("Download of Debian image completed"))

return tmpZip, rel.Version, nil
}

Expand Down
Loading