1
0
mirror of https://github.com/rancher/cli.git synced 2026-02-05 09:48:36 +01:00

Merge pull request #239 from gitlawr/project_app_upgrade

Fix project-scoped catalog app upgrade
This commit is contained in:
Dan Ramich
2019-08-07 11:03:13 -07:00
committed by GitHub
2 changed files with 10 additions and 11 deletions

View File

@@ -468,14 +468,9 @@ func updateExternalIDVersion(externalID string, version string) (string, error)
return "", err
}
q := u.Query()
q.Set("version", version)
// Need to unescape here to get the raw string for the externalId filter
catalogQuery, err := url.QueryUnescape(q.Encode())
if err != nil {
return "", err
}
return "catalog://?" + catalogQuery, nil
oldVersionQuery := fmt.Sprintf("version=%s", u.Query().Get("version"))
newVersionQuery := fmt.Sprintf("version=%s", version)
return strings.Replace(externalID, oldVersionQuery, newVersionQuery, 1), nil
}
func appRollback(ctx *cli.Context) error {