Ensure the Python interpreter used by the runtime ignores user site-packages. Fixes #6269

Significant debugging by Peter Buckner.
This commit is contained in:
Dave Page 2021-03-17 15:20:20 +00:00
parent 4bb71c56ad
commit ded65340fe
2 changed files with 3 additions and 2 deletions

View File

@ -43,6 +43,7 @@ Bug fixes
| `Issue #6253 <https://redmine.postgresql.org/issues/6253>`_ - Fixed an issue where the user is unable to create a subscription if the host/IP address for connection is 127.0.0.1.
| `Issue #6259 <https://redmine.postgresql.org/issues/6259>`_ - Ensure that proper error message should be shown on the properties and statistics tab in case of insufficient privileges for a subscription.
| `Issue #6260 <https://redmine.postgresql.org/issues/6260>`_ - Fixed an issue where the 'Create Slot' option is disabled in case of the same IP/host provided but the port is different.
| `Issue #6269 <https://redmine.postgresql.org/issues/6269>`_ - Ensure the Python interpreter used by the runtime ignores user site-packages.
| `Issue #6272 <https://redmine.postgresql.org/issues/6272>`_ - Fixed an issue where the user is not able to change the connection in Query Tool when any SQL file is opened.
| `Issue #6279 <https://redmine.postgresql.org/issues/6279>`_ - Ensure that the venv activation scripts have the correct path in them on Linux.
| `Issue #6281 <https://redmine.postgresql.org/issues/6281>`_ - Fixed an issue where schema diff showing wrong SQL when comparing triggers with different when clause.

View File

@ -69,7 +69,7 @@ function startDesktopMode() {
// Write Python Path, pgAdmin file path and command in log file.
misc.writeServerLog('pgAdmin Runtime Environment');
misc.writeServerLog('--------------------------------------------------------');
let command = path.resolve(pythonPath) + ' ' + path.resolve(pgadminFile);
let command = path.resolve(pythonPath) + ' -s ' + path.resolve(pgadminFile);
misc.writeServerLog('Python Path: "' + path.resolve(pythonPath) + '"');
misc.writeServerLog('Runtime Config File: "' + path.resolve(misc.getRunTimeConfigFile()) + '"');
misc.writeServerLog('pgAdmin Config File: "' + path.resolve(configFile) + '"');
@ -82,7 +82,7 @@ function startDesktopMode() {
misc.writeServerLog('--------------------------------------------------------\n');
// Spawn the process to start pgAdmin4 server.
pgadminServerProcess = spawn(pythonPath, [pgadminFile]);
pgadminServerProcess = spawn(path.resolve(pythonPath), ['-s', path.resolve(pgadminFile)]);
pgadminServerProcess.on('error', function(err) {
// Log the error into the log file if process failed to launch
misc.writeServerLog('Failed to launch pgAdmin4. Error:');