# Shell Challenge in C. Stuck on #GP4

**URL:** <https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [January 27, 2025, 10:09pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513 "2025-01-27T22:09:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jromeo3415](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/jromeo3415/32/4607_2.png) [@jromeo3415](https://forum.codecrafters.io/u/jromeo3415)\
**Post date:** [January 27, 2025, 10:09pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513/1 "2025-01-27T22:09:26Z")

</div>

I’m stuck on Stage #GP4

I’ve tried using printf to confirm that the tester switched to it’s home directory, and it appears it does so. Testing my program on my local machine shows that it runs as intended. I saw the exact same error was experienced for people attempting this challenge in GO, and it was claimed to be an error with the tester.

Here are my logs:

remote: [tester::#GP4] Running tests for Stage #GP4 (Navigation - The cd builtin: Home directory)  
remote: [tester::#GP4] Running ./your\_program.sh  
remote: [your-program] $ cd /tmp/pear/strawberry/pear  
remote: [your-program] $ pwd  
remote: [your-program] /tmp/pear/strawberry/pear  
remote: [tester::#GP4] Received current working directory response  
remote: [your-program] $ cd ~  
remote: [tester::#GP4] Expected prompt ("$ ") but received “”  
remote: [tester::#GP4] Assertion failed.  
remote: [tester::#GP4] Test failed

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [January 27, 2025, 10:09pm UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513/2 "2025-01-27T22:09:27Z")

</div>

Hi, thanks for your post!

I’m currently out of the office and will return on Feb 3. I’ll get back to you as soon as possible after I’m back.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [September 25, 2025, 7:00am UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513/4 "2025-09-25T07:00:11Z")

</div>

@jromeo3415 Sorry for the delayed response!

Let me know if you still need assistance with this.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [October 1, 2025, 7:28am UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513/6 "2025-10-01T07:28:57Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [October 6, 2025, 7:29am UTC](https://forum.codecrafters.io/t/shell-challenge-in-c-stuck-on-gp4/4513/7 "2025-10-06T07:29:29Z")

</div>

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