From eaf9d083326700a55740e7bcf7795f4bea2279b4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 21 Sep 2021 05:08:08 +0000 Subject: [PATCH] build: add --no-user for pip commands in Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I ran into "Cannot combine --user and --target" in an environment and adding --no-user seemed to fix it. Refs: https://stackoverflow.com/a/67259534/436641 PR-URL: https://github.com/nodejs/node/pull/40169 Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen Reviewed-By: Christian Clauss --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index baae6a3b46bd26..1b9f84131eb66e 100644 --- a/Makefile +++ b/Makefile @@ -1392,8 +1392,8 @@ cpplint: lint-cpp # Try with '--system' if it fails without; the system may have set '--user' lint-py-build: $(info Pip installing flake8 linter on $(shell $(PYTHON) --version)...) - $(PYTHON) -m pip install --upgrade -t tools/pip/site-packages flake8 || \ - $(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages flake8 + $(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages flake8 || \ + $(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages flake8 ifneq ("","$(wildcard tools/pip/site-packages/flake8)") .PHONY: lint-py @@ -1412,8 +1412,8 @@ endif # Try with '--system' if it fails without; the system may have set '--user' lint-yaml-build: $(info Pip installing yamllint on $(shell $(PYTHON) --version)...) - $(PYTHON) -m pip install --upgrade -t tools/pip/site-packages yamllint || \ - $(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint + $(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages yamllint || \ + $(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages yamllint .PHONY: lint-yaml # Lints the YAML files with yamllint.