refactor: use Bun.file for reading /etc/shells

This commit is contained in:
LukeParkerDev 2026-04-02 12:45:50 +10:00
parent 29c344b94c
commit 4c384e4f86

View file

@ -126,7 +126,7 @@ export namespace Shell {
) as string[]
} else {
try {
const text = await import("fs/promises").then((fs) => fs.readFile("/etc/shells", "utf-8"))
const text = await Bun.file("/etc/shells").text()
return text.split("\n").filter((line) => line.trim() && !line.startsWith("#"))
} catch {
return ["/bin/bash", "/bin/zsh", "/bin/sh"]