Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion run.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ func Run(options ...*RunOptions) (*Playwright, error) {
}
up2date, err := driver.isUpToDateDriver()
if err != nil || !up2date {
return nil, fmt.Errorf("please install the driver (v%s) first: %w", playwrightCliVersion, err)
ferr := fmt.Errorf("please install the driver (v%s) first", playwrightCliVersion)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about just spliting the check, that way, errors can be descriptive.

if err != nil {
ferr = fmt.Errorf("%w: %w", ferr, err)
}
return nil, ferr
}
connection, err := driver.run()
if err != nil {
Expand Down
Loading