File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -93,22 +93,9 @@ func (g *GitopsDeployer) Deploy() error {
93
93
}
94
94
95
95
g .logger .Info ("Writing bundle to filesystem" , "path" , bundlePath )
96
- exists , err = fileExists ( g .fs , bundlePath )
96
+ bundleFile , err := g .fs . Create ( bundlePath )
97
97
if err != nil {
98
- return fmt .Errorf ("could not check if bundle exists: %w" , err )
99
- }
100
-
101
- var bundleFile billy.File
102
- if exists {
103
- bundleFile , err = g .fs .OpenFile (bundlePath , os .O_RDWR , os .ModePerm )
104
- if err != nil {
105
- return fmt .Errorf ("could not open bundle file: %w" , err )
106
- }
107
- } else {
108
- bundleFile , err = g .fs .Create (bundlePath )
109
- if err != nil {
110
- return fmt .Errorf ("could not create bundle file: %w" , err )
111
- }
98
+ return fmt .Errorf ("could not create bundle file: %w" , err )
112
99
}
113
100
114
101
_ , err = bundleFile .Write (bundle )
You can’t perform that action at this time.
0 commit comments