mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Set PYTHONPATH environment variable for Python script scrapers (#4372)
* Set PYTHONPATH environment variable for Python script scrapers * Convert PYTHONPATH to absolute * Generalise and apply to plugins --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,8 @@ func (s *scriptScraper) runScraperScript(ctx context.Context, inString string, o
|
||||
logger.Warnf("%s", err)
|
||||
} else {
|
||||
cmd = p.Command(context.TODO(), command[1:])
|
||||
envVariable, _ := filepath.Abs(filepath.Dir(filepath.Dir(s.config.path)))
|
||||
python.AppendPythonPath(cmd, envVariable)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user