Files
sim/packages/sim-setup/src/executables.ts
T
Theodore Li 1372977d07 feat(setup): publish standalone self-hosting package (#6849)
* feat(setup): publish standalone self-hosting package

* fix(setup): refresh discovered compose installs

* improvement(setup): unify repository command

* fix(setup): harden standalone package launch

* Update README.md

* fix(setup): isolate standalone compose installs

* fix(setup): restore default stopped installs
2026-08-19 20:04:05 -04:00

9 lines
364 B
TypeScript

import { spawnSync } from 'node:child_process'
/** Checks executable resolution without depending on a shell or Bun runtime. */
export function executableExists(command: string): boolean {
const result = spawnSync(command, ['--version'], { stdio: 'ignore' })
if (!result.error) return true
return (result.error as NodeJS.ErrnoException).code !== 'ENOENT'
}