Skip to content

Commit ed0010f

Browse files
authored
fix: ignore nil error for up2date (#552)
1 parent 556282e commit ed0010f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ func Run(options ...*RunOptions) (*Playwright, error) {
276276
}
277277
up2date, err := driver.isUpToDateDriver()
278278
if err != nil || !up2date {
279-
return nil, fmt.Errorf("please install the driver (v%s) first: %w", playwrightCliVersion, err)
279+
ferr := fmt.Errorf("please install the driver (v%s) first", playwrightCliVersion)
280+
if err != nil {
281+
ferr = fmt.Errorf("%w: %w", ferr, err)
282+
}
283+
return nil, ferr
280284
}
281285
connection, err := driver.run()
282286
if err != nil {

0 commit comments

Comments
 (0)