vendredi 12 avril 2019

Calling "stty size" in testing produces "Inappropriate ioctl for device" error, how to fix it?

I needed to get the dimensions of my terminal window and I found this question which provided a working solution for me.
However, now I am writing a test for it, and both two of the top offered solutions (with cmd.Stdin = os.Stdin and Syscall) are returning an error for me:

stty: 'standard input': Inappropriate ioctl for device

I am using Goland IDE, but tests seem to fail running from IDE and command prompt altogether. Maybe any of you guys have an idea for how to solve or get to the root of this issue?

Aucun commentaire:

Enregistrer un commentaire