File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func Build(ctx context.Context, opts *BOpts) error {
8888 export .Output = func (map [string ]string ) (io.WriteCloser , error ) {
8989 return wf , nil
9090 }
91- export .Attrs ["output" ] = filepath .Join (opts .basePath , "out.tar" )
91+ export .Attrs ["output" ] = filepath .Join (GlobalExportPath , opts .BuildID , "out.tar" )
9292 if _ , ok := export .Attrs ["name" ]; ! ok {
9393 export .Attrs ["name" ] = opts .Tag
9494 }
Original file line number Diff line number Diff line change @@ -120,13 +120,15 @@ func (p *StreamPipeline) Run() error {
120120 case err == nil :
121121 stage .process (pkt )
122122 handled = true
123- break
124123 case errors .Is (err , ErrIgnorePacket ):
125124 continue
126125 default : // real error
127126 logrus .WithError (err ).Warn ("Filter error" )
128127 continue
129128 }
129+ if handled {
130+ break
131+ }
130132 }
131133 if ! handled {
132134 logrus .WithField ("build_id" , pkt .BuildId ).Debug ("dropped unhandled packet" )
@@ -136,6 +138,6 @@ func (p *StreamPipeline) Run() error {
136138
137139 <- p .ctx .Done ()
138140 p .wg .Wait ()
139- close ( p . sendCh )
141+ // Don't close sendCh - let it be garbage collected to avoid "send on closed channel" panic
140142 return p .ctx .Err ()
141143}
You can’t perform that action at this time.
0 commit comments