I keep getting the same error output and I suspect there is a problem with the test. I’ve been unable to change the error message no matter how I change or comment out the code. I’ve tried printing debug messages, but those don’t print either. I am wondering if there is a problem with the test.
If I run the code locally, it works fine, but running the tests with codecrafters test always fails on this particular test.
Here are my logs:
[tester::#GP4] Running tests for Stage #GP4 (Navigation - The cd builtin: Home directory)
[tester::#GP4] Running ./your_shell.sh
[tester::#GP4] Expected prompt ("$ ") to be printed, got ""
[tester::#GP4] Test failed
We’ve identified this to be a caching issue where some languages rely on $HOME to cache build artifacts, so when this stage executes a script with a different HOME it starts compiling / downloading dependencies again.
We’re still thinking about how to rectify this… Fixing each language’s reliance on $HOME feels very error-prone and hard for us to get right. Our current most promising idea is to change the tests for this stage to work with a fixed HOME value and test things like cd ~/random_dir.