summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-09-27 15:03:24 +0200
committerGitHub <noreply@github.com>2022-09-27 15:03:24 +0200
commit904b324716933561028205b23ac10088f108a6de (patch)
tree2149e886e8305699717e6c43aa31bf3f740f3d6a /modules
parentAdd filetree on left of diff view (#21012) (diff)
downloadforgejo-904b324716933561028205b23ac10088f108a6de.tar.xz
forgejo-904b324716933561028205b23ac10088f108a6de.zip
Fix empty container layer history and UI (#21251)
Fixes #21248
Diffstat (limited to 'modules')
-rw-r--r--modules/packages/container/metadata.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/packages/container/metadata.go b/modules/packages/container/metadata.go
index 4222cdb30a..fd38e67859 100644
--- a/modules/packages/container/metadata.go
+++ b/modules/packages/container/metadata.go
@@ -95,7 +95,9 @@ func parseOCIImageConfig(r io.Reader) (*Metadata, error) {
if i := strings.Index(cmd, "#(nop) "); i != -1 {
cmd = strings.TrimSpace(cmd[i+7:])
}
- imageLayers = append(imageLayers, cmd)
+ if cmd != "" {
+ imageLayers = append(imageLayers, cmd)
+ }
}
metadata := &Metadata{