mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix python not being resolved correctly if not in path (#4864)
* Don't replace plugin exec path if python command. Don't clobber exec * Fix logging of python resolve errors
This commit is contained in:
@@ -35,7 +35,7 @@ func Resolve(configuredPythonPath string) (*Python, error) {
|
||||
case err == nil && !isFile:
|
||||
logger.Warnf("configured python path is not a file: %s", configuredPythonPath)
|
||||
case err != nil:
|
||||
logger.Warnf("unable to use configured python path: %s", err)
|
||||
logger.Warnf("unable to use configured python path: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ func Resolve(configuredPythonPath string) (*Python, error) {
|
||||
if err != nil {
|
||||
python, err := exec.LookPath("python")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("python executable not in PATH: %s", err)
|
||||
return nil, fmt.Errorf("python executable not in PATH: %w", err)
|
||||
}
|
||||
ret := Python(python)
|
||||
return &ret, nil
|
||||
|
||||
Reference in New Issue
Block a user