.replit trouble get compiler script to run in dynamic folder

Question:
How do I get .replit script to run in the folder where the open script I run is located?
The AI suggested this:

language = "nix"
run = "cd $REPLIT_RUN_DIR && haxe build.hxml"

It is not working. .replit can’t find the file and fails with: Could not process this argument (file not found)

Everything runs fine from Shell in any folder with: haxe build.hxml
As long as the required files are present: build.hxml and Main.hx

I just would like the convenience of the [run] button to work. :grin:

Welcome to Ask @lpmwfx!

I think the AI meant to replace $REPLIT_RUN_DIR with the folder you wish to run.

2 Likes