I finished Redirection section a few months back. I’m now trying to work on the next couple of sections, but without any code change the test runner is failing me:
[tester::#MG5\] Running tests for Stage #MG5 (Locate executable files)
[tester::#MG5\] \[setup\] export PATH=/tmp/cow:$PATH
[tester::#MG5\] \[setup\] export PATH=/tmp/bee:$PATH
[tester::#MG5\] \[setup\] export PATH=/tmp/pig:$PATH
[tester::#MG5\] \[setup\] PATH is now: /tmp/pig:/tmp/bee:/tmp/cow:/go/bin:…
[tester::#MG5\] \[setup\] Available executables:
[tester::#MG5\] \[setup\] - my_exe
[tester::#MG5\] Running ./your_program.sh
[your-program\] $ type cat
[your-program\] cat is /bin/cat
[tester::#MG5\] ✓ Received expected response
[your-program\] $ type cp
[your-program\] cp is /bin/cp
[tester::#MG5\] ✓ Received expected response
[your-program\] $ type mkdir
[your-program\] mkdir is /bin/mkdir
[tester::#MG5\] ✓ Received expected response
[your-program\] $ type my_exe
[your-program\] my_exe is /tmp/pig/my_exe
[tester::#MG5\] ^ Line does not match expected value.
[tester::#MG5\] Expected: “my_exe is /tmp/bee/my_exe”
[tester::#MG5\] Received: “my_exe is /tmp/pig/my_exe”
[your-program\] $
[tester::#MG5\] Assertion failed.
[tester::#MG5\] Test failed
I printed the content of the 3 tmp dirs (cow, bee, pig) and can confirm that my_exe exists in all three dirs. Because the expected response is /tmp/bee/ (second dir) , my_exe should not be in the first dir but somehow it ends up there and is causing this error.