mirror of
https://github.com/fedora-python/tox-current-env.git
synced 2025-11-26 03:59:53 +01:00
Do not run commands_pre or commands_post with --print-deps-to/--print-extras-to
Fixes https://github.com/fedora-python/tox-current-env/issues/58
This commit is contained in:
@@ -90,6 +90,15 @@ def tox_configure(config):
|
||||
config.envconfigs[testenv].usedevelop = False
|
||||
_allow_all_externals(config.envconfigs[testenv])
|
||||
|
||||
# When printing dependencies/extras we don't run any commands.
|
||||
# Unfortunately tox_runtest_pre/tox_runtest_post hooks don't use firstresult=True,
|
||||
# so we cannot override running commands_pre/commands_post.
|
||||
# We empty the lists of commands instead.
|
||||
if config.option.print_deps_to or config.option.print_extras_to:
|
||||
for testenv in config.envconfigs:
|
||||
config.envconfigs[testenv].commands_pre = []
|
||||
config.envconfigs[testenv].commands_post = []
|
||||
|
||||
if (getattr(config.option.print_deps_to, "name", object()) ==
|
||||
getattr(config.option.print_extras_to, "name", object())):
|
||||
raise tox.exception.ConfigError(
|
||||
|
||||
Reference in New Issue
Block a user