Files
start-os/sdk/base/lib/util/splitCommand.ts
Aiden McClelland 855c1f1b07 style(sdk): apply prettier with single quotes
Run prettier across sdk/base and sdk/package to apply the
standardized quote style (single quotes matching web).
2026-02-05 13:34:01 -07:00

9 lines
221 B
TypeScript

import { arrayOf, string } from 'ts-matches'
export const splitCommand = (
command: string | [string, ...string[]],
): string[] => {
if (arrayOf(string).test(command)) return command
return ['sh', '-c', command]
}