You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to use drawio as a system_binary. It crashes with SIGSEGV and other errors if the following environment variables are not given: DISPLAY, HOME, DBUS_SESSION_BUS_ADDRESS.
When pants runs the fingerprinting step, it invokes the binary with a cleared environment. There is currently no way to specify which env vars to keep for the fingerprinting step.
Describe alternatives you've considered
Workaround the issue by creating a wrapper shell script that replies to only the fingerprinting using a special args value and forwards all other options and parameters to the target system binary.
Additional context
The fingerprinting error:
ValueError: Could not find a binary with name `drawio`.
The following paths were searched: /bin, /opt/drawio, /opt/homebrew/bin, /usr/bin, /usr/local/bin, /usr/sbin.
Btw, the error message is quite misleading as the binary can be found, just the fingerprinting fails.
This was already reported in #19013.
The generated __run.sh currently looks like this:
#!/usr/bin/env bash# This command line should execute the same process as pants did internally.cd /tmp/pants-sandbox-lpxUQZ
env -i /opt/drawio/drawio --version
Executing __run.sh manually reveals the error:
$ env -i /opt/drawio/drawio --version
[152836:0106/210646.416373:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[152836:0106/210646.416407:ERROR:env.cc(257)] The platform failed to initialize. Exiting.
[1] 152836 segmentation fault (core dumped) env -i /opt/drawio/drawio --version
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to use
drawio
as asystem_binary
. It crashes withSIGSEGV
and other errors if the following environment variables are not given:DISPLAY
,HOME
,DBUS_SESSION_BUS_ADDRESS
.When pants runs the fingerprinting step, it invokes the binary with a cleared environment. There is currently no way to specify which env vars to keep for the fingerprinting step.
Describe the solution you'd like
Add the parameter
extra_env_vars
to system_binary, just like it exists for adhoc_tool or shell_command.Describe alternatives you've considered
Workaround the issue by creating a wrapper shell script that replies to only the fingerprinting using a special
args
value and forwards all other options and parameters to the target system binary.Additional context
The fingerprinting error:
Btw, the error message is quite misleading as the binary can be found, just the fingerprinting fails.
This was already reported in #19013.
The generated
__run.sh
currently looks like this:Executing
__run.sh
manually reveals the error:$ env -i /opt/drawio/drawio --version [152836:0106/210646.416373:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY [152836:0106/210646.416407:ERROR:env.cc(257)] The platform failed to initialize. Exiting. [1] 152836 segmentation fault (core dumped) env -i /opt/drawio/drawio --version
The text was updated successfully, but these errors were encountered: