Hello Folks,
I know this exact problem has been asked before, however I am running into an interesting issue. When I run the code locally, it seems to work. However when I submit the code the exact same test case fails. Attaching output from my terminal for reference.
Language: Java, version 25
Happy to share the code, if required.
Thanks in advance!!!
░▒▓ ~/C/Github/codecrafters-shell-java on master codecrafters test INT ✘ took 25s 25 at 07:46:14 PM ▓▒░
Initiating test run...
⚡ This is a turbo test run. https://codecrafters.io/turbo
Running tests on your code. Logs should appear shortly...
[compile] WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
[compile] WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/usr/share/maven/lib/guice-5.1.0-classes.jar)
[compile] WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
[compile] WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.
Debug = true
[tester::#MG5] Running tests for Stage #MG5 (Locate executable files)
[tester::#MG5] [setup] export PATH=/tmp/fox:$PATH
[tester::#MG5] [setup] export PATH=/tmp/bee:$PATH
[tester::#MG5] [setup] export PATH=/tmp/pig:$PATH
[tester::#MG5] [setup] PATH is now: /tmp/pig:/tmp/bee:/tmp/fox:...
[tester::#MG5] [setup] Files created:
[tester::#MG5] [setup] - /tmp/fox/my_exe (not executable)
[tester::#MG5] [setup] - /tmp/pig/my_exe (not executable)
[tester::#MG5] [setup] - /tmp/bee/my_exe (executable)
[tester::#MG5] Running ./your_program.sh
[your-program] $ type cat
[your-program] cat: not found
[tester::#MG5] ^ Line does not match expected value.
[tester::#MG5] Expected: "cat is /bin/cat"
[tester::#MG5] Received: "cat: not found"
[your-program] $
[tester::#MG5] Assertion failed.
[tester::#MG5] Test failed
View our article on debugging test failures: https://codecrafters.io/debug
░▒▓ ~/C/Github/codecrafters-shell-java on master ./your_program.sh ✔ took 16s 25 at 07:54:02 PM ▓▒░
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/opt/homebrew/Cellar/maven/3.9.9/libexec/lib/jansi-2.4.1.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/opt/homebrew/Cellar/maven/3.9.9/libexec/lib/guava-33.2.1-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
$ type cat
cat is /bin/cat
$
