New ๐ŸŒŠ wave for @helm

Commit 0fdede58

0fdede584148Merged

zhilyaev <[email protected]> ยท 5 years ago ยท 2 files ยท ~2 modified

Description

mv or copy & create timestamp folder in os.TempDir

Details

Commit
0fdede584148
Parent
4fbc026989b1

pkg/plan/export.gomodifiedView file

@@ -122,15 +122,17 @@
122122 }
123123
124124 // It doesnt work if workdir is mount.
125- // return os.Rename(
126- // filepath.Join(p.tmpDir, Values),
127- // filepath.Join(p.dir, Values),
128- // )
129-
130- return dir.Copy(
125+ err := os.Rename(
131126 filepath.Join(p.tmpDir, Values),
132127 filepath.Join(p.dir, Values),
133128 )
129+ if err != nil {
130+ return dir.Copy(
131+ filepath.Join(p.tmpDir, Values),
132+ filepath.Join(p.dir, Values),
133+ )
134+ }
135+ return nil
134136 }
135137
136138 // IsExist returns true if planfile exists