File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ func buildRemote(bParams *build.BuildParams) error {
58
58
59
59
buildDir := moscommon .GetBuildDir (projectDir )
60
60
61
+ buildContextName , _ := ioutil .ReadFile (moscommon .GetBuildCtxFilePath (buildDir ))
62
+
61
63
os .RemoveAll (buildDir )
62
64
if err := os .MkdirAll (buildDir , 0755 ); err != nil {
63
65
return errors .Annotatef (err , "failed to create build directory" )
@@ -281,9 +283,9 @@ func buildRemote(bParams *build.BuildParams) error {
281
283
return errors .Trace (err )
282
284
}
283
285
284
- if data , err := ioutil . ReadFile ( moscommon . GetBuildCtxFilePath ( buildDir )); err = = nil {
286
+ if buildContextName ! = nil {
285
287
// Successfully read build context name, transmit it to the remote builder
286
- if err := mpw .WriteField (moscommon .FormBuildCtxName , string (data )); err != nil {
288
+ if err := mpw .WriteField (moscommon .FormBuildCtxName , string (buildContextName )); err != nil {
287
289
return errors .Trace (err )
288
290
}
289
291
}
You can’t perform that action at this time.
0 commit comments