[QP2][C] Builtin completion

Hello, I have encountered an error, which I will attach below. My github code: GitHub - Treeesk/codecrafters-shell-c . I added keystroke processing using termios.h. After that, errors started appearing on tests that used to work, I don’t quite understand where exactly the error appeared. As I understand it, it doesn’t even reach the deadline from 2>>, and the error appears after the first line entered.

remote: [your-program] $ ls -1 nonexistent >> /tmp/quz/baz.md
remote: [your-program] ls: nonexistent: No such file or directory
remote: [tester::#UN3] ✓ Received error message
remote: [tester::#UN3] ✓ File: /tmp/quz/baz.md is empty
remote: [your-program] $ ls -1 nonexistent 2>> /tmp/quz/qux.md
remote: [tester::#UN3] Expected prompt ("$ ") but received ""
remote: [your-program] execv: Permission denied
remote: [your-program] $
remote: [tester::#UN3] Assertion failed.
remote: [tester::#UN3] Test failed

I’ll take a look and get back to you early next week.

Hi @Treeesk, it looks like check_path isn’t working as expected:

The execv: Permission denied error occurs because execv is attempting to execute programs with invalid paths.

And what exactly is wrong with the path? I don’t quite understand why this error appeared before I added termios.h everything worked. I added debugging information and the path to the path was duplicated.

remote: [your-program] $ ls -1 nonexistent 2>> /tmp/bar/foo.md
remote: [your-program] execv: Permission denied
remote: [tester::#UN3] Expected prompt ("$ ") but received "execv: Permission denied"
remote: [your-program] /tmp/grape/raspberry/strawberry//tmp/grape/raspberry/strawberry/$
remote: [tester::#UN3] Assertion failed.

@Treeesk Looks like you’ve got past this stage. Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

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