Skip to content

Commit

Permalink
Make svg creation optional for test to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
TilakMaddy committed Oct 5, 2024
1 parent 4a7eef9 commit ae74394
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 11 deletions.
9 changes: 5 additions & 4 deletions aderyn_core/src/context/flow/visualizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ pub mod control_flow_tests {

let mut cmd = Command::new("dot");
cmd.args(["-Tsvg", &dot_file_path]);
let raw_output = cmd.output().expect("dot failed");
let output_svg = String::from_utf8(raw_output.stdout).unwrap();

_ = std::fs::write(Path::new(&svg_file_path), output_svg);
if let Ok(raw_output) = cmd.output() {
if let Ok(output_svg) = String::from_utf8(raw_output.stdout) {
_ = std::fs::write(Path::new(&svg_file_path), output_svg);
}
}
}
}
38 changes: 36 additions & 2 deletions reports/report.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 36 additions & 5 deletions reports/report.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions reports/report.sarif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae74394

Please sign in to comment.