Skip to content

Commit 43f537b

Browse files
committed
在 Start 函数中添加欢迎信息打印,优化用户体验
1 parent 9d8c831 commit 43f537b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/crosspty/pty.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func getNewLine(shellName string) string {
3131
}
3232

3333
func Start(shellPath string, env map[string]string, welcome string) error {
34+
println(welcome)
35+
3436
ptmx, err := pty.New()
3537
if err != nil {
3638
return err
@@ -127,8 +129,6 @@ func Start(shellPath string, env map[string]string, welcome string) error {
127129
close(stopCh)
128130
}
129131

130-
println(welcome)
131-
132132
_, _ = ptmx.Write([]byte(newLine))
133133

134134
go func() {

0 commit comments

Comments
 (0)