Building a shell, stage #008

I’m stuck on stage #008

I’ve tried typing in codecrafters submit, as the challenge suggested but it keeps failing.

Here are my logs:

This is a turbo test run. https://codecrafters.io/turbo

Running tests on your code. Logs should appear shortly...

[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.

[tester::#OO8] Running tests for Stage #OO8 (Print a prompt)
[tester::#OO8] Running ./your_program.sh
[tester::#OO8] Expected prompt ("$ ") but received ""
[tester::#OO8] Test failed

NOTE: This failure is expected! Uncomment code in app/main.py.

View instructions: https://app.codecrafters.io/courses/shell/stages/oo8


And here’s a snippet of my code

cat << ‘EOF’ > app/main.py
import sys

def main():
sys.stdout.write("$ ")
sys.stdout.flush()

if name == “main”:
main()
EOF

Hey @Hbaggins, could you share a screenshot of how the code appears in your editor? That’ll help us debug this further.

@andy1li

Here’s the screenshot:

@Hbaggins Thanks for the screenshot! Could you also share a screenshot of the code as it appears in your editor? Like this:

I understand that the code in your editor is likely correct, but since that doesn’t seem to be reflected on our servers, seeing the editor view would help us narrow down what’s happening.

It may reveal an issue with file contents, saving, or the setup steps that isn’t visible from the test output alone.

Sorry! Is this what you mean?

Yes, could you delete the comment symbol and the space (# ), save the file, and try submitting again?

It worked, thanks so much