Skip to content

Commit

Permalink
feat: add an option to append additional PlantUML arguments when gene…
Browse files Browse the repository at this point in the history
…rating diagrams

fix #11
  • Loading branch information
tmorin committed Sep 21, 2024
1 parent fda3b9f commit 532d1fe
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ pub fn build_cli() -> Command {
.long("args")
.action(ArgAction::Set)
.num_args(1..)
.value_delimiter(' ')
.help("Extra arguments for PlantUML."))
.arg(&arg_cache_directory)
.arg(&arg_plantuml_version)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/diagram/generate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mod test {
"-s=target/tests/cmd/diagram/generate/source",
"-C=target/tests/cmd/diagram/generate/cache",
"-P=test/plantuml-1.2022.4.jar",
"-a=-png",
"-a=-png -v",
]);
execute_diagram_generate(
arg_matches
Expand Down
2 changes: 0 additions & 2 deletions src/plantuml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ impl PlantUML {
.output()
.map_err(|e| anyhow::Error::new(e).context(format!("unable to render {}", source)))?;
io::stdout().write_all(&output.stdout)?;
// .map_err(|e| anyhow::Error::new(e).context(format!("unable to write stdout"), Box::from(e)))?;
io::stderr().write_all(&output.stderr)?;
// check the generation
if !output.status.success() {
// .map_err(|e| anyhow::Error::new(e).context(format!("unable to write stderr"), Box::from(e)))?;
return Err(anyhow::Error::msg(format!("failed to render {}", source)));
}

Expand Down

0 comments on commit 532d1fe

Please sign in to comment.