"Build your own shell" - Stage #MG5 (in C): can't run tests. Failed to run go build

I’m stuck on Stage #MG5.

When ran locally:

PATH="/usr/bin:/usr/local/bin" ./your_shell.sh


$ type ls
ls is /usr/bin/ls

Here are my logs:

Initiating test run...

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

Running tests. Logs should appear shortly...

Debug = true

[tester::#MG5] Running tests for Stage #MG5 (The type builtin: executable files)
[tester::#MG5] failed to run go build: exec: "go": executable file not found in $PATH
[tester::#MG5] Test failed

View our article on debugging test failures: https://codecrafters.io/debug
1 Like

same here…
locally it works fine, but when I try with “codecrafters test” or with git it gives me the same error.

Hey everyone,

Thanks for reporting this! Can confirm that this is an issue with how our test runner environments are built, we’re looking into this…


This should be fixed now!

Will keep this open until someone confirms the fix worked for them :slight_smile:

1 Like

works! thank you so much :slight_smile:

The tests appear to be functioning correctly. Although there is a warning related to loading internal components.

It could be a issue within my code, but the last test is failing. Is the test is looking for the “my_exe” executable in my local/project directory?

[tester::#MG5] Running tests for Stage #MG5 (The type builtin: executable files)
# command-line-arguments
loadinternal: cannot find runtime/cgo
[tester::#MG5] Running ./your_shell.sh
[your-program] $
[tester::#MG5] > type cat
[your-program] cat is /bin/cat
[tester::#MG5] ✓ Received expected response
[your-program] $
[tester::#MG5] > type cp
[your-program] cp is /bin/cp
[tester::#MG5] ✓ Received expected response
[your-program] $
[tester::#MG5] > type mkdir
[your-program] mkdir is /bin/mkdir
[tester::#MG5] ✓ Received expected response
[your-program] $
[tester::#MG5] > type my_exe
[your-program] my_exe: command not found
[your-program] $
[tester::#MG5] Expected output to match "my_exe is /app/my_exe", got "my_exe: command not found\r\n$ "
[tester::#MG5] condition not met
[tester::#MG5] Test failed

Getting the “runtime/cgo” loading error too, but it passed all the tests so guess there’s something wrong in your code (I’m using linux so I don’t know, maybe mine won’t work too in Windows!).

I am on Linux (Pop os). I will check my code, maybe I missed something.

oh alr, got confused reading exe hehe.
if u want u can take hint from mine, just uploaded.

1 Like

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