You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install symlink to Python 3 to work around AzP diff coverage issue (#3803)
What I did
In Azure Pipelines, the PythonScript task appears to default to expecting the Python interpreter to be present at /usr/bin/python. This task type is used as part of diff coverage reporting. However, on Ubuntu 22.04 and newer, only Python 3 is present by default, which means /usr/bin/python isn't present.
As a workaround, install the python-is-python3 package, which just adds a symlink from /usr/bin/python to /usr/bin/python3. This makes the PythonScript task happy now that it can run Python commands using the interpreter at /usr/bin/python.
When the steps that add the diff coverage task set pythonInterpreter: '/usr/bin/python3' so that PythonScript runs the script using /usr/bin/python3, or PythonScript falls back to looking for /usr/bin/python3 if /usr/bin/python is not present, then this workaround can be removed.
0 commit comments