Skip to content

Commit e641989

Browse files
authored
Use --break-system-packages with pip on MacOS
1 parent 25ca39d commit e641989

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ runs:
6464
- name: Checkout code
6565
uses: actions/checkout@v4
6666
- name: Set up Python
67+
id: setup-python
6768
uses: actions/setup-python@v4
6869
with:
6970
python-version: ${{ inputs.python-version }}
@@ -131,6 +132,11 @@ runs:
131132
fi
132133
fi
133134
135+
# deal with HomeBrew managed Python on GitHub Hosted MacOS runners
136+
if [[ "${RUNNER_OS}" == "macOS" ]]; then
137+
EXTRA_PIP_FLAGS="${EXTRA_PIP_FLAGS} --break-system-packages"
138+
fi
139+
134140
echo "::debug::Installing ${INPUTS_LINTER}${LINTER_VERSION_CONSTRAINT} for Python ${INPUTS_PYTHON_VERSION}"
135141
136142
# install linter

0 commit comments

Comments
 (0)