refactor: unwrap Shell namespace + self-reexport (#22964)
This commit is contained in:
@@ -8,7 +8,6 @@ import { setTimeout as sleep } from "node:timers/promises"
|
|||||||
|
|
||||||
const SIGKILL_TIMEOUT_MS = 200
|
const SIGKILL_TIMEOUT_MS = 200
|
||||||
|
|
||||||
export namespace Shell {
|
|
||||||
const BLACKLIST = new Set(["fish", "nu"])
|
const BLACKLIST = new Set(["fish", "nu"])
|
||||||
const LOGIN = new Set(["bash", "dash", "fish", "ksh", "sh", "zsh"])
|
const LOGIN = new Set(["bash", "dash", "fish", "ksh", "sh", "zsh"])
|
||||||
const POSIX = new Set(["bash", "dash", "ksh", "sh", "zsh"])
|
const POSIX = new Set(["bash", "dash", "ksh", "sh", "zsh"])
|
||||||
@@ -107,4 +106,5 @@ export namespace Shell {
|
|||||||
export const preferred = lazy(() => select(process.env.SHELL))
|
export const preferred = lazy(() => select(process.env.SHELL))
|
||||||
|
|
||||||
export const acceptable = lazy(() => select(process.env.SHELL, { acceptable: true }))
|
export const acceptable = lazy(() => select(process.env.SHELL, { acceptable: true }))
|
||||||
}
|
|
||||||
|
export * as Shell from "./shell"
|
||||||
|
|||||||
Reference in New Issue
Block a user