1、change tty default sh

This commit is contained in:
redhat 2025-05-21 19:14:12 +08:00
parent dd0b3cd6f2
commit dc78e4cb65
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ func TerminalHandle() func(c *gin.Context) error {
}
defer conn.Close()
cmd := exec.Command("bash")
cmd := exec.Command("sh")
ptyFile, err := pty.Start(cmd)
if err != nil {
log.Sugar().Errorf("Failed to start pty: %v", err)

View File

@ -50,12 +50,12 @@ func (b *baseEventBus) Unsubscribe(key string, ob Observer) {
}
type SyncEventBus struct {
baseEventBus
*baseEventBus
}
func NewSyncEventBus() *SyncEventBus {
return &SyncEventBus{
baseEventBus: *newBaseEventBus(),
baseEventBus: newBaseEventBus(),
}
}
@ -81,7 +81,7 @@ func (s *SyncEventBus) handleErr(_ context.Context, errs map[Observer]error) {
}
type AsyncEventBus struct {
baseEventBus
*baseEventBus
errC chan *observerWithErr
celFn context.CancelFunc
ctx context.Context
@ -94,7 +94,7 @@ type observerWithErr struct {
func NewAsyncEventBus() *AsyncEventBus {
res := &AsyncEventBus{
baseEventBus: *newBaseEventBus(),
baseEventBus: newBaseEventBus(),
}
res.errC = make(chan *observerWithErr)