@@ -46,8 +46,8 @@ type Release struct {
4646// DownloadConfirmCB is a function that is called when a Debian image is ready to be downloaded.
4747type DownloadConfirmCB func (target string ) (bool , error )
4848
49- func DownloadAndExtract (ctx context.Context , client * Client , targetVersion string , upgradeConfirmCb DownloadConfirmCB , forceYes bool , temp * paths.Path ) (* paths.Path , string , error ) {
50- tmpZip , version , err := DownloadImage (ctx , client , targetVersion , upgradeConfirmCb , forceYes , temp )
49+ func DownloadAndExtract (ctx context.Context , client * Client , targetVersion string , temp * paths.Path ) (* paths.Path , string , error ) {
50+ tmpZip , version , err := DownloadImage (ctx , client , targetVersion , temp )
5151 if err != nil {
5252 return nil , "" , fmt .Errorf ("error downloading the image: %v" , err )
5353 }
@@ -69,7 +69,7 @@ func DownloadAndExtract(ctx context.Context, client *Client, targetVersion strin
6969 return imagePath , version , nil
7070}
7171
72- func DownloadImage (ctx context.Context , client * Client , targetVersion string , upgradeConfirmCb DownloadConfirmCB , forceYes bool , downloadPath * paths.Path ) (* paths.Path , string , error ) {
72+ func DownloadImage (ctx context.Context , client * Client , targetVersion string , downloadPath * paths.Path ) (* paths.Path , string , error ) {
7373 var err error
7474
7575 feedback .Print (i18n .Tr ("Checking for Debian image releases" ))
@@ -94,17 +94,6 @@ func DownloadImage(ctx context.Context, client *Client, targetVersion string, up
9494 return nil , "" , fmt .Errorf ("could not find Debian image %s" , targetVersion )
9595 }
9696
97- if ! forceYes {
98- res , err := upgradeConfirmCb (rel .Version )
99- if err != nil {
100- return nil , "" , err
101- }
102- if ! res {
103- feedback .Print (i18n .Tr ("Download not confirmed by user, exiting" ))
104- return nil , "" , nil
105- }
106- }
107-
10897 download , size , err := client .FetchZip (ctx , rel .Url )
10998 if err != nil {
11099 return nil , "" , fmt .Errorf ("could not fetch Debian image: %w" , err )
0 commit comments