mirror of
https://github.com/sagiegurari/cargo-make
synced 2026-06-08 17:20:03 +00:00
Fix: fix rust script invocation as load_script #1035
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
## CHANGELOG
|
||||
|
||||
### v0.37.9
|
||||
|
||||
* Fix: fix rust script invocation as load_script #1035
|
||||
|
||||
### v0.37.8 (2024-01-24)
|
||||
|
||||
* Enhancement: Support script runners and shebang in condition scripts #987
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
|
||||
[config]
|
||||
load_script = """
|
||||
#!@rust
|
||||
|
||||
fn main() {
|
||||
println!("test load script invocation via rust");
|
||||
}
|
||||
"""
|
||||
|
||||
[tasks.rust]
|
||||
script_runner = "@rust"
|
||||
script = '''
|
||||
|
||||
@@ -27,7 +27,11 @@ pub(crate) fn create_persisted_script_file(script_text: &Vec<String>, extension:
|
||||
let bytes = Sha256::digest(string_bytes);
|
||||
let file_name = bytes_to_hex(&bytes[..]);
|
||||
|
||||
let directory = envmnt::get_or_panic("CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY");
|
||||
let default_target_directory = envmnt::get_or("CARGO_MAKE_CRATE_TARGET_DIRECTORY", "target");
|
||||
let directory = envmnt::get_or(
|
||||
"CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY",
|
||||
&default_target_directory,
|
||||
);
|
||||
let mut file_path_buf = PathBuf::new();
|
||||
file_path_buf.push(&directory);
|
||||
file_path_buf.push("_cargo_make_temp");
|
||||
|
||||
Reference in New Issue
Block a user