Skip to content

Commit 73c47e4

Browse files
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
1 parent 5f81301 commit 73c47e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Guidelines for modifications:
4242
* Chenyu Yang
4343
* David Yang
4444
* Gary Lvov
45+
* Giulio Romualdi
4546
* HoJin Jeon
4647
* Jean Tampon
4748
* Jia Lin Yuan

docker/utils/container_interface.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ def enter(self):
142142
"exec",
143143
"--interactive",
144144
"--tty",
145-
"-e",
146-
f"DISPLAY={os.environ['DISPLAY']}",
145+
*(["-e", f"DISPLAY={os.environ['DISPLAY']}"] if "DISPLAY" in os.environ else []),
147146
f"{self.container_name}",
148147
"bash",
149148
])

0 commit comments

Comments
 (0)