Stage #OO8 failing at stage #GP4 with Expected prompt (“$ “) but received “” Issue

I’m stuck on Stage #GP4.

All the tests are passing until first stage #OO8, where the tester seems to timeout before the main function even starts.
It used to work before but is somehow failing now.

Have seen a similar issue here.

Is this a Go version error ?

Here are my logs:

[tester::#NI6] Running tests for Stage #NI6 (Quoting - Single quotes)
[tester::#NI6] [setup] export PATH=/tmp/mango/apple/strawberry:$PATH
[tester::#NI6] Running ./your_shell.sh
[tester::#NI6] [setup] echo -n "raspberry apple." > "/tmp/qux/f   23"
[tester::#NI6] [setup] echo -n "orange raspberry." > "/tmp/qux/f   54"
[tester::#NI6] [setup] echo -n "banana apple." > "/tmp/qux/f   11"
[your-program] $ echo 'example test'
[your-program] example test
[tester::#NI6] ✓ Received expected response
[your-program] $ echo test     hello
[your-program] test hello
[tester::#NI6] ✓ Received expected response
[your-program] $ echo 'script     world' 'hello''example' test''shell
[your-program] script     world helloexample testshell
[tester::#NI6] ✓ Received expected response
[your-program] $ cat '/tmp/qux/f   23' '/tmp/qux/f   54' '/tmp/qux/f   11'
[your-program] raspberry apple.orange raspberry.banana apple.
[tester::#NI6] ✓ Received expected response
[your-program] $
[tester::#NI6] Test passed.

[tester::#GP4] Running tests for Stage #GP4 (Navigation - The cd builtin: Home directory)
[tester::#GP4] Running ./your_shell.sh
[tester::#GP4] Expected prompt ("$ ") but received ""
[tester::#GP4] Assertion failed.
[tester::#GP4] Test failed

And here’s a snippet of main code:

func main() {
	for {
		fmt.Fprint(os.Stdout, "$ ")

		userInput, err := bufio.NewReader(os.Stdin).ReadString('\n')
		if err != nil {
			fmt.Println("error reading input:", err)
			os.Exit(1)
		}

		cmd, args := parseInput(userInput[:len(userInput)-1])

		handleCommand(cmd, args)
	}
}

Git repo for reference:

Hey @LitoleNINJA, I’ve upgraded the buildpack for you repo and pushed a fix to it. You can run git pull to sync the changes.

Let me know if you’re still running into issues.

1 Like

Thanks for the help @andy1li :grinning_face:
It works now :+1:

1 Like

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