Legedith / Dungeons

Learn Linux terminal commands through a text based adventure game
MIT License
15 stars 5 forks source link

figlet: invalid option -- 'c' #9

Open mdtrooper opened 4 years ago

mdtrooper commented 4 years ago

the script launch this bug sometimes:

figlet: invalid option -- 'c'

And the toilet version is:

$ dpkg -l toilet
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===============================================
ii  toilet         0.3-1.2      amd64        display large colourful characters in text mode

And the laptop has:

$ lsb_release --all
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 20
Release:    20
Codename:   ulyana
am401 commented 3 years ago

Hey @mdtrooper thank you for highlighting this issue. So looking around it may be a case of where figlet doesn't come pre-installed or fully setup on Linux Mint 20. As I don't have direct access to Linux Mint at this time, would you mind providing the output if any for:

command -v figlet

Thank you!

mdtrooper commented 3 years ago

Yes. I send the output:

$ command -v figlet
/usr/bin/figlet

And:

$ file /usr/bin/figlet
/usr/bin/figlet: symbolic link to /etc/alternatives/figlet

And follow the white rabbit:

$ file /etc/alternatives/figlet
/etc/alternatives/figlet: symbolic link to /usr/bin/figlet-toilet

$file /usr/bin/figlet-toilet
/usr/bin/figlet-toilet: symbolic link to toilet

$ whereis toilet
toilet: /usr/bin/toilet /usr/share/man/man1/toilet.1.gz

$ file /usr/bin/toilet
/usr/bin/toilet: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5d5e14514e9c852fe85c57ec20ad263d256d2acf, stripped
am401 commented 3 years ago

Thank you so much for the provided information. Definitely a bit of a rabbit hole as far as how LinuxMint seems to handle figlet. Will look further in to seeing the best way to handle the call. Thank you for bringing this issue up!

am401 commented 3 years ago

@Legedith are you opposed to looking at incorporating PyFiglet in to the project?

Legedith commented 3 years ago

@am401 No I'm not. It would be a wonderful addition.