All checks were successful
PR Check / check (pull_request) Successful in 1m3s
User reported regression introduced in v0.7.6: PowerShell / cmd open
in a separate external console window instead of attaching to the
xterm.js tab (v0.7.5 worked).
Root cause: the ConPTY wiring used
attrList.Update(PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE,
unsafe.Pointer(&hPC), // ← wrong
unsafe.Sizeof(hPC))
The PSEUDOCONSOLE attribute is a Win32 API quirk: lpValue must be
the HPCON *value* (cast to PVOID), not a pointer to the local
variable holding the handle. With &hPC the kernel reads garbage,
silently drops the attribute, and CreateProcessW spawns the child
with a fresh console — hence the external window.
Fix is one line:
unsafe.Pointer(uintptr(hPC))
Confirmed against Microsoft's EchoCon sample and Go libraries that
work in production (UserExistsError/conpty, aymanbagabas/go-pty).
- internal/version/version.go: 0.7.7 → 0.7.8
- CHANGELOG.md: v0.7.8 entry with the diagnostic write-up
34 lines
670 B
Go
34 lines
670 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
const (
|
|
Name = "muyue"
|
|
Version = "0.7.8"
|
|
Author = "La Légion de Muyue"
|
|
)
|
|
|
|
var (
|
|
// BuildDate is set at build time
|
|
BuildDate = ""
|
|
)
|
|
|
|
func FullVersion() string {
|
|
return Name + " v" + Version
|
|
}
|
|
|
|
// FullInfo returns full version information.
|
|
func FullInfo() string {
|
|
info := fmt.Sprintf("%-12s %s\n", "Version:", Version)
|
|
info += fmt.Sprintf("%-12s %s\n", "Author:", Author)
|
|
info += fmt.Sprintf("%-12s %s\n", "Go:", runtime.Version())
|
|
info += fmt.Sprintf("%-12s %s\n", "Platform:", runtime.GOOS+"/"+runtime.GOARCH)
|
|
if BuildDate != "" {
|
|
info += fmt.Sprintf("%-12s %s\n", "Build:", BuildDate)
|
|
}
|
|
return info
|
|
}
|