k9withabone / autocast

Automate terminal demos
https://crates.io/crates/autocast
GNU General Public License v3.0
88 stars 6 forks source link

Hang with demo - debug mode/extra output? #9

Open jasonmadigan opened 7 months ago

jasonmadigan commented 7 months ago

Trying this out with demo.yaml, but autocast seems to hang after some small status output (reading lines etc.)

autocast demo.yaml demo.cast
Read from file: demo.yaml # hangs here

demo.cast remains empty.

Any way to enable extra logging to see what's going on?

k9withabone commented 7 months ago

demo.yaml is a bit special as it runs autocast and asciinema within autocast. That said you should still get a progress bar. Have you tried example.yaml? What's your system setup (OS, shell, etc.)?

demo.cast remains empty.

The output file is written to all at once at the end.

Any way to enable extra logging to see what's going on?

Not at the moment, no. But that's a good idea for the future!

jasonmadigan commented 7 months ago

With example.yaml I see the progress bars for a while longer, but then see a similar hang: autocast

What's your system setup (OS, shell, etc.)?

macOS sonoma + zsh

k9withabone commented 7 months ago

Huh, I think your hitting the same thing @chip did in #8. @chip did you figure out a solution?

I did a little bit of searching, and it looks like macOS includes an ancient version of bash by default. Maybe that is the problem? It looks like you can install a newer version via Homebrew. I use Fedora and don't have a mac to test with.

My guess, based on the GIF, is that autocast completes the instructions but can't exit bash. Looks like autocast needs to use the timeout for the quit command as well.

chip commented 7 months ago

@k9withabone - Sorry, I never got it to work. I was running zsh and my efforts to use bash didn't prove successful.

jasonmadigan commented 7 months ago

Ah, OK, thanks for the pointers. Yeah, macOS ships with a pretty old version of bash (3.2.57 seems to be latest with the latest Sonoma - 14.4). zsh has been the default shell in macOS since Catalina IIRC.

Looking at #8 would give some pointers. Wasn't aware of how this actually works, but I guess working on a new builtin for zsh per https://github.com/k9withabone/autocast/issues/1 would be a good idea. I'll take a look if I get some time.

jasonmadigan commented 6 months ago

Draft PR that fixes, but it would need better eyes on it:

https://github.com/k9withabone/autocast/pull/10