`daemon: tailwind --watch` exits and restarts in a loop
modd.conf
tailwind.config.js {
daemon: tailwind --watch --output ./build/tailwind.css
}
Output of running modd
11:16:21: daemon: tailwind --watch --output ./build/tailwind.css
Rebuilding...
exited: exit status 0
>> restart backoff... 1000ms
>> starting...
Rebuilding...
exited: exit status 0
>> restart backoff... 2000ms
Which continues forever.
Expected output:
Rebuilding...
Done in 977ms.
Still an issue with tailwind v3.4.1 and modd v0.8
Same with modd master? the only other things i can think of is the either the env or stdin/stdout/stderr is different. To look at env maybe add a env ; ... before and see if you see something fishy, for stdin/stdout/stderr maybe do tailwind --watch --output ./build/tailwind.css 2>&1 < /dev/null | cat in an interactive shell to force stderr/stdout to a non-tty and stdin reading from null device (seems to be what will end up happening).
Try this daemon: tailwind --watch --output ./build/tailwind.css < /dev/stdin but i'm not sure hows stdin that will be, i guess it will be modd's that gets inherited down
Same with modd master?
If I have time I'll look into the master build.
Try this
daemon: tailwind --watch --output ./build/tailwind.css < /dev/stdin
Issue persists.
Now when i think about it stdin will probably be /dev/null also, maybe something like sleep 999999 | tailwind ... could make tailwind have a stdin to block on and be happy, i suspect it exits when stdin ends
Wow, that did it! Great thinking, I had no idea stdin was both needed, and didn't exist.
🥳 do you know if other modd-like tools have the same issue with tailwind? not really sure what "foregrounded" tools should expect from stdin hmm