Problem with submitting #BR6 stage

I’m stuck on Stage #BR6.

when i use codecrafters submit command the stage fail but when i use codecrafters test it pass also when i try on my machine it works as expected. also i tried using is isatty but it didn’t help

UPDATE 1: after using isatty(STDOUT_FILENO) it works and passed but failed on the next stage

and the same problem as the previous stage occurred again
Here are my logs for submit command:
[tester::#BR6] Running tests for Stage #BR6 (Pipelines - Dual-command pipeline)
[tester::#BR6] [setup] export PATH=/tmp/raspberry/mango/blueberry:$PATH
[tester::#BR6] Running ./your_program.sh
[tester::#BR6] [setup] echo “pineapple apple\ngrape raspberry\nstrawberry orange\nblueberry mango\npear banana” > “/tmp/foo/file-65”
[your-program] $ cat /tmp/foo/file-65 | wc
[your-program] $ 5 10 78
[tester::#BR6] ^ Line does not match expected value.
[tester::#BR6] Expected: " 5 10 78"
[tester::#BR6] Received: “$ 5 10 78”
[tester::#BR6] Assertion failed.
[tester::#BR6] Test failed (try setting ‘debug: true’ in your codecrafters.yml to see more details)

Here are my logs for test command:

[tester::#BR6] Running tests for Stage #BR6 (Pipelines - Dual-command pipeline)

[tester::#BR6] [setup] export PATH=/tmp/mango/blueberry/banana:$PATH

[tester::#BR6] Running ./your_program.sh

[tester::#BR6] [setup] echo “apple raspberry\nstrawberry mango\nbanana orange\npear pineapple\nblueberry grape” > “/tmp/qux/file-87”

[your-program] $ cat /tmp/qux/file-87 | wc

[your-program] 5 10 78

[tester::#BR6] ✓ Received expected response

[tester::#BR6] [setup] echo “1. apple grape\n2. raspberry banana\n3. orange strawberry” > “/tmp/bar/file-26”

[your-program] $ tail -f /tmp/bar/file-26 | head -n 5

[your-program] 1. apple grape

[your-program] 2. raspberry banana

[your-program] 3. orange strawberry

[tester::#BR6] ✓ Received redirected file content

[your-program] 4. grape pear

[tester::#BR6] ✓ Received appended line 4

[your-program] 5. apple banana

[tester::#BR6] ✓ Received appended line 5

[tester::#BR6] Test passed.
…Rest of stages pass

Hey @Mohammed785, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

@andy1li i uploaded the code here is the link repo

i am closing this because i found the error in my code.

@Mohammed785 Would you mind sharing 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.