/home/user owned by user, user starts in cwd /home/user

This commit is contained in:
2026-02-23 23:05:13 -06:00
parent b015d5880a
commit a6d2f6dca7
11 changed files with 199 additions and 46 deletions

View File

@@ -17,7 +17,13 @@ local commandHistory = {}
local terminate = false
syscall.setEnviron("SHELL","rtbash")
syscall.setEnviron("PATH","/bin/")
syscall.chdir("/")
local _home = syscall.getEnviron("HOME")
if _home and _home ~= "" then
local ok = pcall(syscall.chdir, _home)
if not ok then syscall.chdir("/") end
else
syscall.chdir("/")
end
local oldWD = ""
for i = 1, 16 do