• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 25259185675

02 May 2026 06:47PM UTC coverage: 92.141% (-0.8%) from 92.955%
25259185675

push

github

web-flow
Fix the dynamic UI. (#23306)

In #23114 we upgraded to indicatif 0.18.4,
which included a fix to respect TERM, and 
display nothing if it's unset.

Since we did not pass TERM through pantsd, the
dynamic ui is now not shown. 

This change fixes that, and also pass NO_COLOR
through, since indicatif inspects it too.

88773 of 96345 relevant lines covered (92.14%)

3.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.89
/src/python/pants/backend/python/goals/run_pex_binary.py
1
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
import os
4✔
5

6
from pants.backend.python.goals.package_pex_binary import (
4✔
7
    PexBinaryFieldSet,
8
    built_package_for_pex_from_targets_request,
9
    package_pex_binary,
10
)
11
from pants.backend.python.target_types import PexLayout
4✔
12
from pants.backend.python.util_rules.pex import find_interpreter
4✔
13
from pants.core.goals.run import RunRequest
4✔
14
from pants.engine.rules import collect_rules, implicitly, rule
4✔
15
from pants.util.logging import LogLevel
4✔
16

17

18
@rule(level=LogLevel.DEBUG)
4✔
19
async def create_pex_binary_run_request(field_set: PexBinaryFieldSet) -> RunRequest:
4✔
20
    pex_request = await package_pex_binary(field_set, **implicitly())
×
21
    built_pex = await built_package_for_pex_from_targets_request(field_set, **implicitly())
×
22

23
    # We need a Python executable to fulfil `adhoc_tool`/`runnable_dependency` requests
24
    # as sandboxed processes will not have a `python` available on the `PATH`.
25
    python = await find_interpreter(
×
26
        **implicitly(pex_request.request.to_interpreter_constraints_request())
27
    )
28

29
    relpath = built_pex.artifacts[0].relpath
×
30
    assert relpath is not None
×
31
    if field_set.layout.value != PexLayout.ZIPAPP.value:
×
32
        relpath = os.path.join(relpath, "__main__.py")
×
33

34
    return RunRequest(
×
35
        digest=built_pex.digest,
36
        args=[python.path, os.path.join("{chroot}", relpath)],
37
    )
38

39

40
# NB: Technically we could implement RunDebugAdapterRequest by using `debugpy`.
41
# However it is unclear how the user would be able to debug the code,
42
# as the client and server will disagree on the code's path.
43

44

45
def rules():
4✔
46
    return [
4✔
47
        *collect_rules(),
48
        *PexBinaryFieldSet.rules(),
49
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc