Skip to content

Commit

Permalink
Fix stdin error
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed Oct 16, 2023
1 parent fb8c523 commit 933fd0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/envd/internal/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ func (p *Process) Kill() {

func (p *Process) WriteStdin(data string) error {
_, err := io.WriteString(*p.Stdin, data)
if err != nil {
return fmt.Errorf("error writing to stdin of process '%s': %w", p.ID, err)
}

return fmt.Errorf("error writing to stdin of process '%s': %w", p.ID, err)
return nil
}
5 changes: 4 additions & 1 deletion packages/envd/internal/terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ func (t *Terminal) Destroy() {

func (t *Terminal) Write(b []byte) error {
_, err := t.tty.Write(b)
if err != nil {
return fmt.Errorf("error writing to terminal '%s': %w", t.ID, err)
}

return fmt.Errorf("error writing to terminal '%s': %w", t.ID, err)
return nil
}

func (t *Terminal) Resize(cols, rows uint16) error {
Expand Down

0 comments on commit 933fd0f

Please sign in to comment.