Skip to content

Commit 858099c

Browse files
fix lint by handling errors
1 parent d7efd69 commit 858099c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/addons/helm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,16 @@ func helmInstallBinary(addon *assets.Addon, runner command.Runner) error {
7979
_, err = runner.RunCmd(exec.Command("test", "-d", "/usr/local/bin"))
8080
if err != nil {
8181
_, err = runner.RunCmd(exec.Command("sudo", "mkdir", "-p", "/usr/local/bin"))
82+
if err != nil {
83+
return errors.Wrap(err, "creating /usr/local/bin")
84+
}
8285
}
8386

8487
installCmd := fmt.Sprint("curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh")
8588
_, err = runner.RunCmd(exec.Command("sudo", "bash", "-c", installCmd))
89+
if err != nil {
90+
return errors.Wrap(err, "downloading helm")
91+
}
8692
// we copy the binary from /usr/local/bin to /usr/bin because /usr/local/bin is not in PATH in both iso and kicbase
8793
_, err = runner.RunCmd(exec.Command("sudo", "mv", "/usr/local/bin/helm", "/usr/bin/helm"))
8894
if err != nil {

0 commit comments

Comments
 (0)