fix(daytona): don't guess /root on cwd probe failure, keep constructor default; update tests to reflect this

Signed-off-by: rovle <lovre.pesut@gmail.com>
This commit is contained in:
rovle 2026-03-05 11:49:35 -08:00
parent 4f1464b3af
commit efc7a7b957
2 changed files with 7 additions and 6 deletions

View file

@ -98,9 +98,10 @@ class DaytonaEnvironment(BaseEnvironment):
if self._requested_cwd in ("~", "/home/daytona"):
try:
home = self._sandbox.process.exec("echo $HOME").result.strip()
self.cwd = home or "/root"
if home:
self.cwd = home
except Exception:
self.cwd = "/root"
pass # leave cwd as-is; sandbox will use its own default
logger.info("Daytona: resolved cwd to %s", self.cwd)
def _ensure_sandbox_ready(self):