mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
![]() When we run `roc run <file>` or `roc <file>` then Roc will compile a binary and run it. Before this commit we would set the path to the compiled binary as argv[0]. This commit changes the behavior to make argv[0] in the binary correspond to the roc file being ran. This benefits the use of roc scripts that make use of a shebang: #!/usr/bin/env roc With this change such scripts will be able to read the path to themselves out of ARGV. This trick is commonly used for instance by bash scripts in order to access files relative to the script itself. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |