Co-authored-by: Kevin Mulvey <kmulvey@linux.com>
This commit is contained in:
parent
4f087674f4
commit
40549e1132
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
cli: Fix panic in `alloc logs` command when receiving empty stdout or stderr log frames
|
||||
```
|
|
@ -397,14 +397,18 @@ func (l *AllocLogsCommand) tailMultipleFiles(client *api.Client, alloc *api.Allo
|
|||
case stdoutErr := <-stdoutErrCh:
|
||||
return fmt.Errorf("received an error from stdout log stream: %v", stdoutErr)
|
||||
case stdoutFrame := <-stdoutFrames:
|
||||
if stdoutFrame != nil {
|
||||
logUI.Output(string(stdoutFrame.Data))
|
||||
}
|
||||
case stderrErr := <-stderrErrCh:
|
||||
return fmt.Errorf("received an error from stderr log stream: %v", stderrErr)
|
||||
case stderrFrame := <-stderrFrames:
|
||||
if stderrFrame != nil {
|
||||
logUI.Warn(string(stderrFrame.Data))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func lookupAllocTask(alloc *api.Allocation) (string, error) {
|
||||
tg := alloc.Job.LookupTaskGroup(alloc.TaskGroup)
|
||||
|
|
Loading…
Reference in New Issue