Skip to content

Commit

Permalink
fix: upgrade 0.7.2 failed
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Jan 30, 2024
1 parent a66992b commit f46b068
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cli/util/breakingchange/upgrader.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ func (u *Upgrader) SaveOldResources() error {
u.ResourcesMap = objsMap
// save to tmp work dir
for namespace, objs := range objsMap {
workDir = fmt.Sprintf("%s/%s", workDir, namespace)
if err = os.MkdirAll(workDir, os.ModePerm); err != nil {
currWorkDir := fmt.Sprintf("%s/%s", workDir, namespace)
if err = os.MkdirAll(currWorkDir, os.ModePerm); err != nil {
return err
}
for i, v := range objs {
filePath := fmt.Sprintf("%s/%s.yaml", workDir, v.GetName())
filePath := fmt.Sprintf("%s/%s.yaml", currWorkDir, v.GetName())
if u.fileExists(filePath) {
obj, err := u.getUnstructuredFromFile(filePath)
if err != nil {
Expand Down

0 comments on commit f46b068

Please sign in to comment.