Fix error on Layer section and reduce information on one line per step.
Instead of printing out multiple lines for some steps in Layer section, now its only printing one line while other informations can be found in Layer details. This change also provides fix for index out of bounds error when user scrolls through steps in Layer section and there exists at least one step with multi-line commands.
This commit is contained in:
parent
c7d121b3d7
commit
4146421e60
@ -2,6 +2,8 @@ package image
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/wagoodman/dive/dive/filetree"
|
||||
)
|
||||
@ -39,5 +41,5 @@ func (l *Layer) String() string {
|
||||
}
|
||||
return fmt.Sprintf(LayerFormat,
|
||||
humanize.Bytes(l.Size),
|
||||
l.Command)
|
||||
strings.Split(l.Command, "\n")[0])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user