#UN3 (Redirection - Append stderr) test case has some issues

I’m stuck on Stage #QP2.

I’ve implemented raw mode using termios, before this i was able to pass this redirection stages but now there seems to be some issue. I can’t figure it out, according to test case:

But if i run the same command locally in terminal, i can see the output. I didn’t touch the redirection part in any way, so it should work. I am not sure what’s going wrong here.

My terminal output:

– Configuring done (0.0s)
– Generating done (0.0s)
– Build files have been written to: /home/devesh/Code/codecrafters-shell-cpp/build
[100%] Built target shell
$ ls -1 nonexistent >> /tmp/own/bee.md
ls: cannot access ‘nonexistent’: No such file or directory

My Github link: GitHub - Devesh42/codecrafters-shell-cpp

I got the issue, i was not handling the Ctrl J, i only handled the case for ‘\r’ in raw terminal mode, so it looked like it was working in my local enviornment, but after adding the case to handle Ctrl +J same as ‘\r’, was able to pass all test cases.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.