1、change tty default sh
This commit is contained in:
parent
dd0b3cd6f2
commit
dc78e4cb65
@ -30,7 +30,7 @@ func TerminalHandle() func(c *gin.Context) error {
|
|||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
||||||
cmd := exec.Command("bash")
|
cmd := exec.Command("sh")
|
||||||
ptyFile, err := pty.Start(cmd)
|
ptyFile, err := pty.Start(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Sugar().Errorf("Failed to start pty: %v", err)
|
log.Sugar().Errorf("Failed to start pty: %v", err)
|
||||||
|
@ -50,12 +50,12 @@ func (b *baseEventBus) Unsubscribe(key string, ob Observer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SyncEventBus struct {
|
type SyncEventBus struct {
|
||||||
baseEventBus
|
*baseEventBus
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSyncEventBus() *SyncEventBus {
|
func NewSyncEventBus() *SyncEventBus {
|
||||||
return &SyncEventBus{
|
return &SyncEventBus{
|
||||||
baseEventBus: *newBaseEventBus(),
|
baseEventBus: newBaseEventBus(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ func (s *SyncEventBus) handleErr(_ context.Context, errs map[Observer]error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type AsyncEventBus struct {
|
type AsyncEventBus struct {
|
||||||
baseEventBus
|
*baseEventBus
|
||||||
errC chan *observerWithErr
|
errC chan *observerWithErr
|
||||||
celFn context.CancelFunc
|
celFn context.CancelFunc
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
@ -94,7 +94,7 @@ type observerWithErr struct {
|
|||||||
|
|
||||||
func NewAsyncEventBus() *AsyncEventBus {
|
func NewAsyncEventBus() *AsyncEventBus {
|
||||||
res := &AsyncEventBus{
|
res := &AsyncEventBus{
|
||||||
baseEventBus: *newBaseEventBus(),
|
baseEventBus: newBaseEventBus(),
|
||||||
}
|
}
|
||||||
|
|
||||||
res.errC = make(chan *observerWithErr)
|
res.errC = make(chan *observerWithErr)
|
||||||
|
Loading…
Reference in New Issue
Block a user