Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUST_SCRIPT_BASE_PATH reports the wrong path when rust-script executes with --base-path arg #135

Closed
wmmc88 opened this issue Aug 1, 2024 · 0 comments · Fixed by #136 · May be fixed by sagiegurari/cargo-make#1157
Closed

Comments

@wmmc88
Copy link
Contributor

wmmc88 commented Aug 1, 2024

RUST_SCRIPT_BASE_PATH does not report the correct base path when using rust-script's --base-path arg.

script.rs:

#![allow(unused_doc_comments)]

println!("{}", std::env::var("RUST_SCRIPT_BASE_PATH").expect("RUST_SCRIPT_BASE_PATH should always be set by rust-script"));

output:

rust-script.exe .\script.rs
D:\git-repos\github\rust-script

❯ rust-script.exe --base-path 'D:\'  .\script.rs
D:\git-repos\github\rust-script

I expected the second run to print the updated base-path: D:\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant