Fix glitch with launching shells

This commit is contained in:
Aaron Heise 2023-02-10 18:19:03 -06:00
parent ced3ee2f98
commit 9e9dabc065

View File

@ -298,11 +298,11 @@ class CallbackSubprocess:
env[key] = self._env[key] env[key] = self._env[key]
program = self._command[0] program = self._command[0]
match = re.search("^/bin/(.*sh)$", program) # match = re.search("^/bin/(.*sh)$", program)
if match: # if match:
self._command[0] = "-" + match.group(1) # self._command[0] = "-" + match.group(1)
env["SHELL"] = program # env["SHELL"] = program
self._log.debug(f"set login shell {self._command}") # self._log.debug(f"set login shell {self._command}")
self._pid, self._child_fd = pty.fork() self._pid, self._child_fd = pty.fork()