Merge pull request #212 from runcom/execsync-fix

execsync: return proper error description
This commit is contained in:
Mrunal Patel 2016-11-24 08:28:45 -08:00 committed by GitHub
commit d12c4b68ac
3 changed files with 79 additions and 29 deletions

View file

@ -32,6 +32,9 @@ func (s *Server) ExecSync(ctx context.Context, req *pb.ExecSyncRequest) (*pb.Exe
}
execResp, err := s.runtime.ExecSync(c, cmd, req.GetTimeout())
if err != nil {
return nil, err
}
resp := &pb.ExecSyncResponse{
Stdout: execResp.Stdout,
Stderr: execResp.Stderr,
@ -39,5 +42,5 @@ func (s *Server) ExecSync(ctx context.Context, req *pb.ExecSyncRequest) (*pb.Exe
}
logrus.Debugf("ExecSyncResponse: %+v", resp)
return resp, err
return resp, nil
}