Skip to content

Commit

Permalink
fix some minor issues with cacert and helm
Browse files Browse the repository at this point in the history
  • Loading branch information
alknopfler committed Oct 24, 2024
1 parent 06da53f commit efb0e10
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/rke2/rke2.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (r *RKE2) Download() error {
log.Printf("failed to download the install.sh script: %v", err)
return err
}
defer resp.Body.Close()

if resp.StatusCode != http.StatusOK {
log.Printf("failed to download the install.sh script: HTTP status %s", resp.Status)
Expand All @@ -66,6 +65,14 @@ func (r *RKE2) Download() error {
log.Printf("failed to create file: %v", err)
return err
}
_, err = io.Copy(out, resp.Body)
if err != nil {
log.Printf("failed to save file: %v", err)
return err
}
log.Printf("install.sh script downloaded successfully to %s", filepath.Join(ensureTrailingSlash(r.OutputDirTarball), "install.sh"))

defer resp.Body.Close()
defer out.Close()

// Download the tarball files for the current release
Expand Down

0 comments on commit efb0e10

Please sign in to comment.