Skip to content

Commit

Permalink
EdkRepo: Prevent environment variables from causing install failures
Browse files Browse the repository at this point in the history
If the following two environment variables in the global system scope:

PIP_INDEX_URL
PIP_TARGET

It will breaks the EdkRepo installer's ability to place files into the
Python site-packages directory. To workaround this, the installer should
temporarily delete those environment variables.

Cc: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Ashley DeSimone <ashley.e.desimone@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
  • Loading branch information
nate-desimone committed Dec 19, 2020
1 parent 1fdc9ab commit b5d45cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ public void PerformInstall(Action<bool, bool> ReportComplete, Action<int> Report
Action ReportFailure = new Action(delegate () { FailureReported = true; });
Environment.SetEnvironmentVariable("PYTHONHOME", null);
Environment.SetEnvironmentVariable("PYTHONPATH", null);
Environment.SetEnvironmentVariable("PIP_INDEX_URL", null);
Environment.SetEnvironmentVariable("PIP_TARGET", null);
if (VendorCustomizer.Instance != null)
{
VendorCustomizer.Instance.WriteToInstallLog = new Action<string>(InstallLogger.Log);
Expand Down

0 comments on commit b5d45cf

Please sign in to comment.