Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ It creates a visual graph representation of the build process.`,
}
defer os.Remove(dotFile.Name())

dotFileContent := dockerfile2dot.BuildDotFile(
dotFileContent, err := dockerfile2dot.BuildDotFile(
dockerfile,
f.concentrate,
f.edgestyle.String(),
Expand All @@ -96,6 +96,9 @@ It creates a visual graph representation of the build process.`,
fmt.Sprintf("%.2f", f.nodesep),
fmt.Sprintf("%.2f", f.ranksep),
)
if err != nil {
return
}

_, err = dotFile.Write([]byte(dotFileContent))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ It creates a visual graph representation of the build process.
stage_0_layer_1->stage_2_layer_1[ arrowhead=empty, ltail=cluster_stage_0, style=dashed ];
stage_1_layer_1->stage_2_layer_2[ arrowhead=empty, ltail=cluster_stage_1, style=dashed ];
subgraph cluster_stage_0 {
label=ubuntu;
label="ubuntu";
margin=16;
stage_0_layer_0 [ fillcolor=white, label="FROM ubuntu:lates...", penwidth=0.5, shape=box, style="filled,rounded", width=2 ];
stage_0_layer_1 [ fillcolor=white, label="RUN apt-get updat...", penwidth=0.5, shape=box, style="filled,rounded", width=2 ];
Expand All @@ -191,7 +191,7 @@ It creates a visual graph representation of the build process.
;
subgraph cluster_stage_2 {
fillcolor=grey90;
label=release;
label="release";
margin=16;
style=filled;
stage_2_layer_0 [ fillcolor=white, label="FROM scratch AS r...", penwidth=0.5, shape=box, style="filled,rounded", width=2 ];
Expand Down
Loading
Loading