mirror of
https://github.com/anomalyco/opencode.git
synced 2026-06-01 06:11:30 +00:00
OpenTUI is here (#2685)
This commit is contained in:
parent
81c617770d
commit
96bdeb3c7b
104 changed files with 8459 additions and 716 deletions
|
|
@ -11,7 +11,10 @@ type TmpDirOptions<T> = {
|
|||
export async function tmpdir<T>(options?: TmpDirOptions<T>) {
|
||||
const dirpath = path.join(os.tmpdir(), "opencode-test-" + Math.random().toString(36).slice(2))
|
||||
await $`mkdir -p ${dirpath}`.quiet()
|
||||
if (options?.git) await $`git init`.cwd(dirpath).quiet()
|
||||
if (options?.git) {
|
||||
await $`git init`.cwd(dirpath).quiet()
|
||||
await $`git commit --allow-empty -m "root commit ${dirpath}"`.cwd(dirpath).quiet()
|
||||
}
|
||||
const extra = await options?.init?.(dirpath)
|
||||
const result = {
|
||||
[Symbol.asyncDispose]: async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue