fornwall / rust-script

Run Rust files and expressions as scripts without any setup or compilation step.
https://rust-script.org
Apache License 2.0
1.25k stars 43 forks source link

fix: `RUST_SCRIPT_BASE_PATH` reports the wrong path when rust-script executes with `--base-path` #136

Closed wmmc88 closed 1 month ago

wmmc88 commented 2 months ago

fixes #135

wmmc88 commented 2 months ago

@fornwall I validated that this fixes the issue reported in #135, but do you have advice for the best place in the repo to insert some sort of test for this scenario?

fornwall commented 1 month ago

@wmmc88 Thanks and sorry for the delay here!

This has now been merged and released in version 0.35.0.

do you have advice for the best place in the repo to insert some sort of test for this scenario?

Added a test in da33453d6e100fe2dac1cea2b8911674368e33e9, using the test mechanism in tests/scripts/. This has not been ported to run under Windows yet, but is a nice&simple way to run some kind of tests.