Skip to content

Commit 3cdee37

Browse files
authored
fix: fix Makefile’s check for goals that require a virtual environment (#299)
Refs: 0cc789d, caba574, 2a24e24
1 parent faf0e00 commit 3cdee37

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ SHELL := /usr/bin/env bash
66

77
# This variable contains the first goal that matches any of the listed goals
88
# here, else it contains an empty string. The net effect is to filter out
9-
# whether this current run of `make` requires a Python virtual environment.
9+
# whether this current run of `make` requires a Python virtual environment
10+
# by checking if any of the given goals requires a virtual environment (all
11+
# except the 'venv' and the various 'clean' and 'nuke' goals do). Note that
12+
# checking for 'upgrade' and 'check' goals includes all of their variations.
1013
NEED_VENV := $(or \
14+
$(findstring all,$(MAKECMDGOALS)), \
1115
$(findstring setup,$(MAKECMDGOALS)), \
12-
$(findstring upgrade-quiet,$(MAKECMDGOALS)), \
1316
$(findstring upgrade,$(MAKECMDGOALS)), \
14-
$(findstring requirements,$(MAKECMDGOALS)), \
1517
$(findstring sbom,$(MAKECMDGOALS)), \
16-
$(findstring all,$(MAKECMDGOALS)), \
17-
$(findstring quick-check,$(MAKECMDGOALS)), \
18+
$(findstring requirements,$(MAKECMDGOALS)), \
1819
$(findstring check,$(MAKECMDGOALS)), \
1920
$(findstring test,$(MAKECMDGOALS)), \
2021
$(findstring dist,$(MAKECMDGOALS)), \
21-
$(findstring docs,$(MAKECMDGOALS)) \
22+
$(findstring docs,$(MAKECMDGOALS)), \
23+
$(findstring prune,$(MAKECMDGOALS)), \
2224
)
2325
ifeq ($(NEED_VENV),)
2426
# None of the current goals requires a virtual environment.

0 commit comments

Comments
 (0)