mirror of
https://github.com/koush/scrypted.git
synced 2026-04-27 02:11:08 +01:00
server: prevent windows from clobbering python path
This commit is contained in:
@@ -53,10 +53,12 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
|
||||
const pluginPythonVersion = options.packageJson.scrypted.pythonVersion?.[os.platform()]?.[os.arch()] || options.packageJson.scrypted.pythonVersion?.default;
|
||||
|
||||
if (os.platform() === 'win32') {
|
||||
pythonPath ||= 'py.exe';
|
||||
const windowsPythonVersion = pluginPythonVersion || process.env.SCRYPTED_WINDOWS_PYTHON_VERSION;
|
||||
if (windowsPythonVersion)
|
||||
args.unshift(windowsPythonVersion)
|
||||
if (!pythonPath) {
|
||||
pythonPath = 'py.exe';
|
||||
const windowsPythonVersion = pluginPythonVersion || process.env.SCRYPTED_WINDOWS_PYTHON_VERSION;
|
||||
if (windowsPythonVersion)
|
||||
args.unshift(windowsPythonVersion)
|
||||
}
|
||||
}
|
||||
else if (pluginPythonVersion) {
|
||||
pythonPath = `python${pluginPythonVersion}`;
|
||||
|
||||
Reference in New Issue
Block a user