Skip to content

Commit

Permalink
opt restriction for Orbstack only
Browse files Browse the repository at this point in the history
Signed-off-by: Dramelac <[email protected]>
  • Loading branch information
Dramelac committed Oct 11, 2023
1 parent 5d901d6 commit 1885fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exegol/model/ContainerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,15 +923,15 @@ def addVolume(self,
if EnvInfo.isMacHost():
# Add support for /etc
path_match = str(path)
if path_match.startswith("/opt/"):
if path_match.startswith("/opt/") and EnvInfo.isOrbstack():
msg = f"{EnvInfo.getDockerEngine().value} cannot mount directory from [magenta]/opt/[/magenta] host path."
if path_match.endswith("entrypoint.sh") or path_match.endswith("spawn.sh"):
msg += " Your exegol installation cannot be stored under this directory."
logger.critical(msg)
raise CancelOperation(msg)
if path_match.startswith("/etc/"):
if EnvInfo.isOrbstack():
raise CancelOperation(f"Orbstack doesn't support sharing /etc files with the container")
raise CancelOperation(f"{EnvInfo.getDockerEngine().value} doesn't support sharing [magenta]/etc[/magenta] files with the container")
path_match = path_match.replace("/etc/", "/private/etc/")
if EnvInfo.isDockerDesktop():
match = False
Expand Down

0 comments on commit 1885fb2

Please sign in to comment.