browser-gopher icon indicating copy to clipboard operation
browser-gopher copied to clipboard

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

Open ddxv opened this issue 3 years ago • 0 comments

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
			}

ddxv avatar Oct 24 '22 00:10 ddxv