Hello! I am trying to get some help.In cargo_mirai.rs, the MIRAI_FLAGS environment variable is used to pass parameters related to Mirai. However, if the MIRAI_FLAGS is modified in cargo_mirai.rs, the default values of MIRAI_FLAGS will be lost. As a result, the main function will not receive the expected parameters. Additionally, even if the modified MIRAI_FLAGS are passed into the main function, the Mirai-related arguments will not be parsed correctly.
```rust
// Add cargo args to cmd until first `--`.
for arg in args.by_ref() {
if arg == "--" {
break;
}
if arg == "--lib" {
continue;
}
cmd.arg(arg);
}
// Serialize the remaining args into an environment variable.
let args_vec: Vec<String> = args.collect();
if !args_vec.is_empty() {
cmd.env(
"MIRAI_FLAGS",
serde_json::to_string(&args_vec).expect("failed to serialize args"),
);
}
Thanks!
Hello! I am trying to get some help.In cargo_mirai.rs, the MIRAI_FLAGS environment variable is used to pass parameters related to Mirai. However, if the MIRAI_FLAGS is modified in cargo_mirai.rs, the default values of MIRAI_FLAGS will be lost. As a result, the main function will not receive the expected parameters. Additionally, even if the modified MIRAI_FLAGS are passed into the main function, the Mirai-related arguments will not be parsed correctly.
Thanks!