Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed May 3, 2024
1 parent 737b42d commit a051145
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rdocs"
version = "0.1.44"
version = "0.1.45"
edition = "2021"
repository = "https:/daniellga/rdocs/"

Expand Down
2 changes: 1 addition & 1 deletion rdocs/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rdocs
Title: Create Quarto documentation for R files from comments
Version: 0.1.44
Version: 0.1.45
Authors@R:
person("Daniel", "Gurgel", , "[email protected]", role = c("aut", "cre"))
Description: Generate R documentation in Quarto format based on comments in code files.
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ fn eval_examples(mut examples: Vec<String>) {

// Iterate for each example chunk in the file.
for example in output_text.split("***end_of_example;") {
if example.is_empty() {
continue;
}
let output = Command::new("Rscript")
.args(["--vanilla", "-e", example])
.stdout(Stdio::null())
Expand All @@ -216,7 +219,7 @@ fn eval_examples(mut examples: Vec<String>) {
if !output.status.success() {
let error_message = String::from_utf8_lossy(&output.stderr);
panic!(
"Error running example:\n\n{}\n\n**********\n\nR code executed:\n\n{}",
"Error running R example:\n{}\nR code executed which generated error:\n{}",
error_message, example
);
}
Expand Down

0 comments on commit a051145

Please sign in to comment.