Bash can’t find command on cover page

Problem description:
Bash can’t find the command, even though it is in the PATHvar (echo $PATH). I am pretty sure this only happens on the cover page of someone else’s repl.

Expected behavior:
The command runs without error.

Actual behavior:
You get a command not found error.

Steps to reproduce:
Go to this link: and click the run button.

Bug appears at this link:

Safari on IOS

running commands by hand, jumplang/jumplang works, possibly bash just doesn’t like calling a directory?

1 Like

I’m suspecting that you put jumplang/jumplang into $PATH for this one:
I suspect that (like environment variables) $PATH is reset for each repl “copy” (fork, cover page run, etc.)

If you run echo $PATH in the cover page, you can see it is still there. So yes, I know it resets, but I configured it to work every time.

I might be blind, and the search function broken, but I cannot find it in $PATH

Edit: literally see it after saying that. :man_facepalming:
Edit2: I don’t know if it will work, but try adding jumplang/jumplang directly to $PATH and see what happens?

Since it’s bash, jumplang is assumed to be a command. You need to call it like a script. (EX: ./jumplang

Not if it is in PATH, ./ explicitly says in this directory and don’t search PATH as far as I know

hmm. In that case, I’m not certain, as it seems to be looking for “jumplang” as a command. I’ll look farther into how bash tries to run things and get back to you.

Got it. The directory /home/runner/JumpLang-Template doesn’t exist on the cover page or in forks, as (on the cover page) it is assigned a seemingly random ID instead (EX: eCqN9C9zjZj). So $PATH’s first parameter /home/runner/JumpLang-Template/jumplang doesn’t exist.
Edit: The ID is contained in $REPL_SLUG


Oh, yeah. The PWD is weird. I will try to fix it!

Wishing you luck! (I can’t find anything on google on how to append a “variable directory” to $PATH)

1 Like

I know how to config it in .replit. This will also let me remove shell.nix, making things a lot easier!

@Firepup650 can you test my fix? Edit I tested myself in private browsing. It works now!

1 Like

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