# Shell: Golang Expected prompt (“$ “) but received “”

**URL:** <https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [August 30, 2025, 7:00pm UTC](https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235 "2025-08-30T19:00:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noxire-Hash](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/noxire-hash/32/16663_2.png) [@Noxire-Hash](https://forum.codecrafters.io/u/Noxire-Hash)\
**Post date:** [August 30, 2025, 7:00pm UTC](https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235/1 "2025-08-30T19:00:17Z")

</div>

I’m stuck on Stage #mg5.

I tried others code as well and anything under the moon go version 1.24.0

Here are my logs:

[tester::#MG5] Running tests for Stage #MG5 (The type builtin: executable files)  
[tester::#MG5] [setup] export PATH=/tmp/foo:$PATH  
[tester::#MG5] [setup] export PATH=/tmp/baz:$PATH  
[tester::#MG5] [setup] export PATH=/tmp/qux:$PATH  
[tester::#MG5] [setup] PATH is now: /tmp/qux:/tmp/baz:/tmp/foo:/go/bin:…  
[tester::#MG5] [setup] Available executables:  
[tester::#MG5] [setup] - my\_exe  
[tester::#MG5] Running ./your\_program.sh  
[tester::#MG5] Expected prompt ("$ ") but received “”  
[tester::#MG5] Assertion failed.  
[tester::#MG5] Test failed (try setting ‘debug: true’ in your codecrafters.yml to see more details)

```go
[tester::#MG5] Running tests for Stage #MG5 (The type builtin: executable files)
[tester::#MG5] [setup] export PATH=/tmp/foo:$PATH
[tester::#MG5] [setup] export PATH=/tmp/qux:$PATH
[tester::#MG5] [setup] export PATH=/tmp/bar:$PATH
[tester::#MG5] [setup] PATH is now: /tmp/bar:/tmp/qux:/tmp/foo:/go/bin:...
[tester::#MG5] [setup] Available executables:
[tester::#MG5] [setup] - my_exe
[tester::#MG5] Running ./your_program.sh
[tester::#MG5] Expected prompt ("$ ") but received ""
[tester::#MG5] Assertion failed.
[tester::#MG5] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

```

And here’s a snippet of my code:

```python
	for !shell.Exit {
		fmt.Fprint(os.Stdout, "$ ")

		userIn, err := bufio.NewReader(os.Stdin).ReadString('\n')
		if err != nil {
			fmt.Printf("reader Error %v \n", err)
		}

```

---

<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:** [August 30, 2025, 7:33pm UTC](https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235/4 "2025-08-30T19:33:37Z")

</div>

Hey @Noxire-Hash, looks like the `.codecrafters` folder was accidentally deleted. I’ve pushed a commit to restore it to your repo. You can run `git pull` to sync.

Let me know if you’re still hitting any issues!

---

<div class="post-metadata">

**Author:** ![Noxire-Hash](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/noxire-hash/32/16663_2.png) [@Noxire-Hash](https://forum.codecrafters.io/u/Noxire-Hash)\
**Post date:** [August 30, 2025, 7:43pm UTC](https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235/6 "2025-08-30T19:43:58Z")

</div>

Wow thanks I didn’t even realized sorry, thanks for fixing it ! (I was trying to fix it for last 3 hours 🙂)

---

<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:** [September 4, 2025, 7:44pm UTC](https://forum.codecrafters.io/t/shell-golang-expected-prompt-but-received/15235/7 "2025-09-04T19:44:50Z")

</div>

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