Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix xdg-open. #10773

Merged
merged 2 commits into from Sep 14, 2020
Merged

Fix xdg-open. #10773

merged 2 commits into from Sep 14, 2020

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Sep 13, 2020

Previously desktop applications failed to launch, falling back
to console programs if available.

[ci skip-rust]
[ci skip-build-wheels]

Previously desktop applications failed to launch, falling back
to console programs if available.

[ci skip-rust]
[ci skip-build-wheels]
@jsirois
Copy link
Member Author

jsirois commented Sep 13, 2020

Previously lynx was used on my machine and only after I answered a prompt about TERM:

$ ./pants test --use-coverage --open-coverage --coverage-py-report="['html']" src/python/pants/engine/process_test.py
...
Wrote html coverage report to `dist/coverage/python`
/bin/xdg-open: line 881: www-browser: command not found
/bin/xdg-open: line 881: links2: command not found
/bin/xdg-open: line 881: elinks: command not found
/bin/xdg-open: line 881: links: command not found


  Your Terminal type is unknown!

  Enter a terminal type: [vt100] xterm-256color

TERMINAL TYPE IS SET TO xterm-256color

Now chrome is opened, which is expected:

$ ./pants test --use-coverage --open-coverage --coverage-py-report="['html']" src/python/pants/engine/process_test.py 
...
Wrote html coverage report to `dist/coverage/python`
$ Opening in existing browser session.
[0913/161509.424932:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

@Eric-Arellano
Copy link
Contributor

Instead you can set something like hermetic_env=False in the constructor iirc. It will use the parent Pants process env.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@jsirois
Copy link
Member Author

jsirois commented Sep 13, 2020

Instead you can set something like hermetic_env=False in the constructor iirc. It will use the parent Pants process env.

Ah, missed that. Done.

Hrm. That's clunky. At some point we'll install audit hooks to deny os.environ though I guess since you can mutate it in python.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling ea19c80 on jsirois:xdg-open/fix into 391d468 on pantsbuild:master.

@jsirois jsirois merged commit be24b14 into pantsbuild:master Sep 14, 2020
@jsirois jsirois deleted the xdg-open/fix branch September 14, 2020 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants