iansinnott / iansinnott/browser-gopher

When more than one browser path defined, error is displayed that browser was not found if any of the paths were not found

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
47
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Given a situation where there are two paths to check: '/first/path/check/', '/second/path/check'

If the browser files are found on one of those paths, but not on the other, the error message will display
`[browser] not found. skipping: [/first/path/check/ /second/path/check/]`

This makes it seem like no browser was found, when in fact one of the paths was successful. Here is the relevant snippet.
```
for _, p := range browser.paths {
_, err := os.Stat(p)
if errors.Is(err, os.ErrNotExist) {
// @todo Put this into a debug logger to avoid noise
log.Println("["+browser.name+"] not found. skipping:", browser.paths)
continue
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.