From 03be923e05b736782fa1e894807a54d33b48aa1a Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Mon, 8 Dec 2025 19:25:41 -0800 Subject: [PATCH] fix(lint): upgrade pip and use public pypi for yamllint (#14746) --- scripts/lint.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lint.js b/scripts/lint.js index eec8aeeb29..9a020cd79c 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -51,6 +51,12 @@ const platformArch = getPlatformArch(); const PYTHON_VENV_PATH = join(TEMP_DIR, 'python_venv'); +const pythonVenvPythonPath = join( + PYTHON_VENV_PATH, + process.platform === 'win32' ? 'Scripts' : 'bin', + process.platform === 'win32' ? 'python.exe' : 'python', +); + const yamllintCheck = process.platform === 'win32' ? `if exist "${PYTHON_VENV_PATH}\\Scripts\\yamllint.exe" (exit 0) else (exit 1)` @@ -107,7 +113,8 @@ const LINTERS = { check: yamllintCheck, installer: ` python3 -m venv "${PYTHON_VENV_PATH}" && \ - "${PYTHON_VENV_PATH}/bin/pip" install "yamllint==${YAMLLINT_VERSION}" + "${pythonVenvPythonPath}" -m pip install --upgrade pip && \ + "${pythonVenvPythonPath}" -m pip install "yamllint==${YAMLLINT_VERSION}" --index-url https://pypi.org/simple `, run: "git ls-files | grep -E '\\.(yaml|yml)' | xargs yamllint --format github", },