I’m stuck on Stage #QP2.
I’ve tried to pass the “Builtin completion (#QP2)” stage from the “Build your own shell” tutorial. It passes the tests for this specific stage, but it shows that my implementation of the previous stage “Append stderr (#UN3)” has issues.
I have tested my implementation of the whole project so far, and reviewed my code numerous times. I tried to replicate the command that causes the problem on your servers, but it does not happen on my machine. Everything works great on my end.
Here are my logs:
[tester::#QP2] Tearing down shell
[tester::#QP2] Running ./your_program.sh
[tester::#QP2] ✓ Received prompt ($ )
[tester::#QP2] Typed "exi"
[tester::#QP2] ✓ Prompt line matches "$ exi"
[tester::#QP2] Pressed "<TAB>" (expecting autocomplete to "exit" followed by a space)
[tester::#QP2] ✓ Prompt line matches "exit "
[your-program] $ exit
[tester::#QP2] Tearing down shell
[tester::#QP2] Test passed.
[tester::#UN3] Running tests for Stage #UN3 (Redirection - Append stderr)
[tester::#UN3] [setup] export PATH=/tmp/blueberry/blueberry/banana:$PATH
[tester::#UN3] Running ./your_program.sh
[your-program] $ ls -1 nonexistent >> /tmp/rat/ant.md
[your-program] ls: nonexistent: No such file or directory
[tester::#UN3] ✓ Received error message
[tester::#UN3] ✓ File: /tmp/rat/ant.md is empty
[your-program] $ ls -1 nonexistent 2>> /tmp/rat/owl.md
[your-program] $ cat /tmp/rat/owl.md
[your-program] ls: nonexistent: No such file or directory
[your-program] cat: n" t1: No such file or directory
[tester::#UN3] ^ Expected prompt ("$ ") but received "cat: n\" t1: No such file or directory"
[your-program] $
[tester::#UN3] Test failed
As you can see it keeps displaying this cat command weird error.
For source code reference: GitHub - iAyman-coder/codecrafters-shell-c · GitHub
