mirror of https://github.com/docker/compose.git
Merge pull request #892 from docker/fix_log_stream_end
Avoid nil pointer when reading logs of a just terminated container.
This commit is contained in:
commit
1cc0ccb189
|
@ -282,6 +282,9 @@ func getACIContainerLogs(ctx context.Context, aciContext store.AciContext, conta
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("cannot get container logs: %v", err)
|
return "", fmt.Errorf("cannot get container logs: %v", err)
|
||||||
}
|
}
|
||||||
|
if logs.Content == nil {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
return *logs.Content, err
|
return *logs.Content, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue