|
|
|
@ -18,6 +18,7 @@ package cmd
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
@ -124,7 +125,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
histClient := action.NewHistory(cfg)
|
|
|
|
histClient := action.NewHistory(cfg)
|
|
|
|
histClient.Max = 1
|
|
|
|
histClient.Max = 1
|
|
|
|
versions, err := histClient.Run(args[0])
|
|
|
|
versions, err := histClient.Run(args[0])
|
|
|
|
if err == driver.ErrReleaseNotFound || isReleaseUninstalled(versions) {
|
|
|
|
if errors.Is(err, driver.ErrReleaseNotFound) || isReleaseUninstalled(versions) {
|
|
|
|
// Only print this to stdout for table output
|
|
|
|
// Only print this to stdout for table output
|
|
|
|
if outfmt == output.Table {
|
|
|
|
if outfmt == output.Table {
|
|
|
|
fmt.Fprintf(out, "Release %q does not exist. Installing it now.\n", args[0])
|
|
|
|
fmt.Fprintf(out, "Release %q does not exist. Installing it now.\n", args[0])
|
|
|
|
|