Skip to content

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

Closed
sagiegurari/cargo-make
#1157
@wmmc88

Description

@wmmc88

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:\

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions