chore: unix shell login

This commit is contained in:
hstyi
2025-01-10 16:35:57 +08:00
committed by hstyi
parent 07bee64b7f
commit 5c4acf85e8

View File

@@ -30,7 +30,12 @@ class PtyConnectorFactory {
envs.putAll(env) envs.putAll(env)
val command = database.terminal.localShell val command = database.terminal.localShell
val ptyProcess = PtyProcessBuilder(arrayOf(command)) val commands = mutableListOf(command)
if (SystemUtils.IS_OS_UNIX) {
commands.add("-l")
}
val ptyProcess = PtyProcessBuilder(commands.toTypedArray())
.setEnvironment(envs) .setEnvironment(envs)
.setInitialRows(rows) .setInitialRows(rows)
.setInitialColumns(cols) .setInitialColumns(cols)