Blender finder: also handle exec.ErrNotFound
as "expected"
Blender not being found can be reported via various errors (this should be reworked in the 'blender finder API' at some point). `exec.ErrNotFound` is returned when Blender cannot be found on `$PATH`, which is something that's absolutely fine. This is now logged less dramatically.
This commit is contained in:
parent
161a7f7cb3
commit
759a94e49b
@ -33,7 +33,7 @@ func findBlender() {
|
||||
|
||||
result, err := find_blender.Find(ctx)
|
||||
switch {
|
||||
case errors.Is(err, fs.ErrNotExist):
|
||||
case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound):
|
||||
log.Warn().Msg("Blender could not be found, Flamenco Manager will have to supply a full path")
|
||||
case err != nil:
|
||||
log.Warn().AnErr("cause", err).Msg("there was an issue finding Blender on this system, Flamenco Manager will have to supply a full path")
|
||||
|
@ -181,7 +181,7 @@ func (f *Flamenco) FindBlenderExePath(e echo.Context) error {
|
||||
// executable and reports on the version of Blender.
|
||||
result, err := find_blender.CheckBlender(ctx, "")
|
||||
switch {
|
||||
case errors.Is(err, fs.ErrNotExist):
|
||||
case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound):
|
||||
logger.Info().Msg("Blender could not be found")
|
||||
case err != nil:
|
||||
logger.Warn().AnErr("cause", err).Msg("there was an issue finding Blender")
|
||||
|
Loading…
x
Reference in New Issue
Block a user