File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
common-npm-packages/docker-common Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -301,13 +301,17 @@ function parseHistoryForLayers(input: string) {
301301
302302function parseHistoryForV1Name ( topHistoryLayer : string ) : string {
303303 let v1Name = "" ;
304- const layerIdString = "layerId:sha256:" ;
305- const indexOfLayerId = topHistoryLayer . indexOf ( layerIdString ) ;
304+ let layerIdString = "layerId:sha256:" ;
305+ let indexOfLayerId = topHistoryLayer . indexOf ( layerIdString ) ;
306+ if ( indexOfLayerId < 0 ) {
307+ layerIdString = "layerId:"
308+ indexOfLayerId = topHistoryLayer . indexOf ( layerIdString ) ;
309+ }
306310 if ( indexOfLayerId >= 0 ) {
307311 v1Name = topHistoryLayer . substring ( indexOfLayerId + layerIdString . length ) ;
308312 }
309313
310- return v1Name ;
314+ return v1Name && v1Name !== "<missing>" ? v1Name : "" ;
311315}
312316
313317export async function getHistory ( connection : ContainerConnection , image : string ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments