yggmail
yggmail copied to clipboard
Not working on Windows (MingW)
Describe the bug
It starts without -password
, and seems to work, but I can't send messages from Thunderbird, as yggmail
doesn't want connections without password.
If I try to run yggmail
with -password
, I get this:
[ Yggmail ] Using database file "yggmail.db"
[ Yggmail ] Generated new server identity
[ Yggmail ] Mail address: 8fedf643a96bb837b36e796bf21924bd33cd27021b6092186ccecde320e8c9f9@yggmail
[ Yggmail ] Please enter your new password:
panic: The handle is invalid.
goroutine 1 [running]:
main.main()
C:/msys64/home/Revertron/go/pkg/mod/github.com/neilalexander/[email protected]/cmd/yggmail/main.go:91 +0x1255
To Reproduce Steps to reproduce the behavior:
- Make
go install github.com/neilalexander/yggmail/cmd/yggmail@latest
in MingW64. - Run
go/bin/yggmail.exe -peer <some peer> -password
. - See the error.
Expected behavior It should get password from stdin.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Win10, MingW64 (latest)
- Version: 20210709230215
Should hopefully be fixed in 63de5e81e477ba08734b7cf02b8b278e45f0c19c, can you please give the latest main commit a try?
Am I doing something wrong?
$ go install github.com/neilalexander/yggmail/cmd/yggmail@63de5e81e477ba08734b7cf02b8b278e45f0c19c
go: downloading github.com/neilalexander/yggmail v0.0.0-20210710104255-63de5e81e477
# github.com/neilalexander/yggmail/cmd/yggmail
go\pkg\mod\github.com\neilalexander\[email protected]\cmd\yggmail\main.go:89:38: cannot use syscall.Stdin (type syscall.Handle) as type int in argument to term.ReadPassword
go\pkg\mod\github.com\neilalexander\[email protected]\cmd\yggmail\main.go:95:38: cannot use syscall.Stdin (type syscall.Handle) as type int in argument to term.ReadPassword
Which version of Go are you using?
Give 90b02ba0d63683db24ef7983732d82b7fa8fd374 a try — this might fix it.
Which version of Go are you using?
go 1.16
Give 90b02ba a try — this might fix it.
[ Yggmail ] Using database file "yggmail.db"
[ Yggmail ] Mail address: 8fedf643a96bb837b36e796bf21924bd33cd27021b6092186ccecde320e8c9f9@yggmail
[ Yggmail ] Please enter your new password:
panic: The handle is invalid.
goroutine 1 [running]:
main.main()
C:/msys64/home/Revertron/go/pkg/mod/github.com/neilalexander/[email protected]/cmd/yggmail/main.go:90 +0x1435
Can you try this not under mingw?
Can you try this not under mingw?
There is no gcc for Windows without MingW:
go: downloading github.com/neilalexander/yggmail v0.0.0-20210710105511-90b02ba0d636
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
I mean try running it under a regular Command Prompt or PowerShell after building the .exe
. I’m wondering if there’s something special about the mingw terminal.
Aha, that works. But escape symbols for coloring do not work. Isn't there a better logging library in Go to handle different terminals?