Runner: canonicalize json-file input via core_bridge when HAKO_NYVM_CORE=1
This commit is contained in:
@ -19,7 +19,7 @@ impl NyashRunner {
|
||||
if !(groups.parser.ny_parser_pipe || groups.parser.json_file.is_some()) {
|
||||
return false;
|
||||
}
|
||||
let json = if let Some(path) = &groups.parser.json_file {
|
||||
let mut json = if let Some(path) = &groups.parser.json_file {
|
||||
match std::fs::read_to_string(path) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
@ -36,6 +36,12 @@ impl NyashRunner {
|
||||
}
|
||||
buf
|
||||
};
|
||||
if crate::config::env::nyvm_core_wrapper() {
|
||||
match crate::runner::modes::common_util::core_bridge::canonicalize_module_json(&json) {
|
||||
Ok(j) => json = j,
|
||||
Err(e) => eprintln!("[bridge] canonicalize warning: {}", e),
|
||||
}
|
||||
}
|
||||
match super::json_v0_bridge::parse_json_v0_to_module(&json) {
|
||||
Ok(module) => {
|
||||
// Optional dump via env verbose
|
||||
|
||||
Reference in New Issue
Block a user