mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 06:50:26 +00:00
use workingDir if shellInstance is nil otherwise use cwd if shellInstance is not nil
This commit is contained in:
parent
f12386e558
commit
8a4d4152ce
1 changed files with 3 additions and 1 deletions
|
|
@ -47,8 +47,10 @@ func GetPersistentShell(workingDir string) *PersistentShell {
|
|||
shellInstance = newPersistentShell(workingDir)
|
||||
})
|
||||
|
||||
if shellInstance == nil || !shellInstance.isAlive {
|
||||
if shellInstance == nil {
|
||||
shellInstance = newPersistentShell(workingDir)
|
||||
} else if !shellInstance.isAlive {
|
||||
shellInstance = newPersistentShell(shellInstance.cwd)
|
||||
}
|
||||
|
||||
return shellInstance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue