mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-15 10:00:28 +00:00
refactor: use Bun.file for reading /etc/shells
This commit is contained in:
parent
29c344b94c
commit
4c384e4f86
1 changed files with 1 additions and 1 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue