←back to thread

167 points jgrahamc | 1 comments | | HN request time: 0.242s | source
Show context
bouke ◴[] No.43557162[source]
So the real problem is that Jest just executes to whatever `sl` resolves. The fix they intent to release doesn't address that, but it tries to recognise the train steaming through. How is this acceptable behaviour from a test runner, as it looks like a disaster to happen. What if I have `alias sl=rm -rf /`, as one typically wants to have such a command close at hand?
replies(4): >>43557349 #>>43557468 #>>43557711 #>>43558209 #
blueflow ◴[] No.43557468[source]
What else should the test runner do?
replies(2): >>43557612 #>>43557677 #
pasc1878 ◴[] No.43557612[source]
Use the full path of sl and not rely on $PATH in the same way cron and macOS GUI apps do for I assume this exact reason.
replies(4): >>43557887 #>>43558500 #>>43558696 #>>43560502 #
skipants ◴[] No.43558696[source]
What if the full path is just `/usr/bin/sl`?
replies(1): >>43559149 #
1. pasc1878 ◴[] No.43559149[source]
Then yopu get the sl there which could be correct.