Skip to content

Commit e173a2b

Browse files
committed
rename the file name from build-cpio.go to build_cpio.go
Signed-off-by: Lavish Pal <lvishpal408@gmail.com>
1 parent 711bd8d commit e173a2b

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

internal/cli/build_cpio_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
"path/filepath"
2222
"testing"
2323

24-
"chainguard.dev/apko/internal/cli"
2524
"github.com/stretchr/testify/require"
2625

26+
"chainguard.dev/apko/internal/cli"
27+
2728
"chainguard.dev/apko/pkg/build"
2829
)
2930

pkg/build/layers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ func splitLayers(ctx context.Context, fsys apkfs.FullFS, groups []*group, pkgToD
299299
// Maintain our "main" stack.
300300
if f.header.Typeflag == tar.TypeDir {
301301
// Pop off any directories that are not parents of the current file's directory.
302-
for i := len(stack) - 1; i >= 0; i-- {
303-
if stack[i].path == path.Dir(f.path) {
302+
for i, v := range slices.Backward(stack) {
303+
if v.path == path.Dir(f.path) {
304304
break
305305
}
306306

0 commit comments

Comments
 (0)