mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 17:54:23 +01:00
use workingDir if shellInstance is nil otherwise use cwd if shellInstance is not nil
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user