Skip to content

Commit

Permalink
fix: nil err
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Aug 21, 2024
1 parent 900c82b commit 5fd7081
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion form.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,10 @@ func (f *Form) run(ctx context.Context) error {
if errors.Is(err, tea.ErrProgramKilled) {
return ErrTimeout
}
return fmt.Errorf("huh: %w", err)
if err != nil {
return fmt.Errorf("huh: %w", err)
}
return nil
}

// runAccessible runs the form in accessible mode.
Expand Down

0 comments on commit 5fd7081

Please sign in to comment.