Skip to content

Commit 684e8cb

Browse files
committed
Fixed the invalid argument error for newer versions of ilasm
1 parent df0e2b4 commit 684e8cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/assembly_exporter/ilasm_exporter.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ impl AssemblyExporter for ILASMExporter {
5656
.expect("Could not create file")
5757
.write_all(&cil)
5858
.expect("Could not write bytes");
59-
let asm_type = "/dll";
59+
let asm_type = "-dll";
6060
let target = format!(
61-
"/output:{out_path}",
61+
"-output:{out_path}",
6262
out_path = out_path.clone().to_string_lossy()
6363
);
6464
let args: [String; 3] = [
@@ -70,12 +70,12 @@ impl AssemblyExporter for ILASMExporter {
7070
.args(args)
7171
.output()
7272
.expect("failed run ilasm process");
73-
let stdout = String::from_utf8(out.stdout).unwrap();
73+
let stdout = String::from_utf8_lossy(&out.stdout);
7474
if !stdout.contains("\nOperation completed successfully\n") {
7575
let err = format!(
7676
"stdout:{} stderr:{}",
7777
stdout,
78-
String::from_utf8(out.stderr).unwrap()
78+
String::from_utf8_lossy(&out.stderr)
7979
);
8080
return Err(AssemblyExportError::ExporterError(err.into()));
8181
}

0 commit comments

Comments
 (0)