File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Agent } from "../../agent/agent"
66import { Provider } from "../../provider/provider"
77import path from "path"
88import fs from "fs/promises"
9+ import { Filesystem } from "../../util/filesystem"
910import matter from "gray-matter"
1011import { Instance } from "../../project/instance"
1112import { EOL } from "os"
@@ -202,8 +203,7 @@ const AgentCreateCommand = cmd({
202203
203204 await fs . mkdir ( targetPath , { recursive : true } )
204205
205- const file = Bun . file ( filePath )
206- if ( await file . exists ( ) ) {
206+ if ( await Filesystem . exists ( filePath ) ) {
207207 if ( isFullyNonInteractive ) {
208208 console . error ( `Error: Agent file already exists: ${ filePath } ` )
209209 process . exit ( 1 )
@@ -212,7 +212,7 @@ const AgentCreateCommand = cmd({
212212 throw new UI . CancelledError ( )
213213 }
214214
215- await Bun . write ( filePath , content )
215+ await Filesystem . write ( filePath , content )
216216
217217 if ( isFullyNonInteractive ) {
218218 console . log ( filePath )
You can’t perform that action at this time.
0 commit comments