mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 22:40:22 +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)
|
shellInstance = newPersistentShell(workingDir)
|
||||||
})
|
})
|
||||||
|
|
||||||
if shellInstance == nil || !shellInstance.isAlive {
|
if shellInstance == nil {
|
||||||
shellInstance = newPersistentShell(workingDir)
|
shellInstance = newPersistentShell(workingDir)
|
||||||
|
} else if !shellInstance.isAlive {
|
||||||
|
shellInstance = newPersistentShell(shellInstance.cwd)
|
||||||
}
|
}
|
||||||
|
|
||||||
return shellInstance
|
return shellInstance
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue