dankamongmen / growlight

notcurses block device manager / system installation tool
https://nick-black.com/dankwiki/index.php/Growlight
GNU General Public License v3.0
85 stars 12 forks source link

External programs in growlight-readline come back with "Multibyte ended unexpectedly" #15

Closed dankamongmen closed 5 years ago

dankamongmen commented 5 years ago

Pretty much any time we shell out in at least growlight-readline, we see something like e.g.:

Multibyte ended unexpectedly: 
Running "mkswap --version 2>&1 < /dev/null"...
mkswap from util-linux 2.34

Multibyte ended unexpectedly: 
Running "grub-mkdevicemap --version 2>&1 < /dev/null"...
grub-mkdevicemap (GRUB) 2.04-2
No ZFS support in this build.

growlight 1.0.6.1

Also happens with e.g. hdparm and nvme. We get the output, and it looks fine, but this line is worrying and confusing for the user.

dankamongmen commented 5 years ago

Got it. We needed to be feeding the NUL terminator through to mbrtowc().