diff --git a/server/src/plugin/runtime/python-worker.ts b/server/src/plugin/runtime/python-worker.ts index a1f779045..a9d43eae7 100644 --- a/server/src/plugin/runtime/python-worker.ts +++ b/server/src/plugin/runtime/python-worker.ts @@ -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}`;