diff --git a/controller/websocket.go b/controller/websocket.go index 2ac3fbf..1b72a47 100644 --- a/controller/websocket.go +++ b/controller/websocket.go @@ -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) diff --git a/pkg/observe/observe.go b/pkg/observe/observe.go index 3030f13..d423aae 100644 --- a/pkg/observe/observe.go +++ b/pkg/observe/observe.go @@ -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)