mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 19:55:11 +00:00
fix(attach): default working directory to invoker's cwd
When running `opencode attach` without `--dir`, the TUI session previously used the server's process.cwd() as its working directory. This changes the default to send the attaching client's cwd so the session operates in the directory where the attach command was invoked.
This commit is contained in:
parent
3c85cf4fac
commit
2d7e9575d2
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ export const AttachCommand = cmd({
|
|||
win32DisableProcessedInput()
|
||||
|
||||
const directory = (() => {
|
||||
if (!args.dir) return undefined
|
||||
if (!args.dir) return process.cwd()
|
||||
try {
|
||||
process.chdir(args.dir)
|
||||
return process.cwd()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue