←back to thread

167 points jgrahamc | 2 comments | | HN request time: 0s | 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 #
1. charcircuit ◴[] No.43558500[source]
Finding the full path of sl requires looking at $PATH
replies(1): >>43559145 #
2. pasc1878 ◴[] No.43559145[source]
In this case not as then you find the wrong sl - you need to know where the correct sl was installed.