Unverified Commit 73c47e4f authored by Giulio Romualdi's avatar Giulio Romualdi Committed by GitHub

Fixes running the docker container when the DISPLAY env variable is not defined (#1163)

# Description

This PR attempts to fix #1162 by adding the possibility to do not pass
the `DISPLAY` env to the docker exec command if the variable is not
defined

Fixes #1162

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 5f813011
...@@ -42,6 +42,7 @@ Guidelines for modifications: ...@@ -42,6 +42,7 @@ Guidelines for modifications:
* Chenyu Yang * Chenyu Yang
* David Yang * David Yang
* Gary Lvov * Gary Lvov
* Giulio Romualdi
* HoJin Jeon * HoJin Jeon
* Jean Tampon * Jean Tampon
* Jia Lin Yuan * Jia Lin Yuan
......
...@@ -142,8 +142,7 @@ class ContainerInterface: ...@@ -142,8 +142,7 @@ class ContainerInterface:
"exec", "exec",
"--interactive", "--interactive",
"--tty", "--tty",
"-e", *(["-e", f"DISPLAY={os.environ['DISPLAY']}"] if "DISPLAY" in os.environ else []),
f"DISPLAY={os.environ['DISPLAY']}",
f"{self.container_name}", f"{self.container_name}",
"bash", "bash",
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment