New build system + hysh functionality #4

Merged
Astronand merged 3 commits from spsf/HyperionOS:main into main 2026-02-21 14:54:02 -05:00
Showing only changes of commit 5bd16b8fd4 - Show all commits
+7 -4
View File
@@ -1,6 +1,5 @@
--:Minify:-- --:Minify:--
local fs = require("sys.fs") local fs = require("sys.fs")
local targetUser = ({ ... })[1] or "root" local targetUser = ({ ... })[1] or "root"
local currentUid = syscall.getuid() local currentUid = syscall.getuid()
@@ -72,6 +71,10 @@ if not shellFn then
return return
end end
syscall.kill(syscall.getppid()) local success, err = syscall.kill(syscall.getppid())
syscall.spawn(shellFn, targetUser .. ":" .. shell, syscall.getEnviron()) if success then
syscall.exit(0) syscall.spawn(shellFn, targetUser .. ":" .. shell, syscall.getEnviron())
syscall.exit(0)
else
print("su: "..err)
end