Skip to content

Commit

Permalink
Select first line if got version information on multiple lines (commi…
Browse files Browse the repository at this point in the history
…t sha ,...) (#29)
  • Loading branch information
plecharpent authored Oct 7, 2024
1 parent 8cf07ff commit 85d39bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/stics_exe_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,11 @@ check_stics_exe <- function(model_path,
# If version is required
if (version) {
# attaching the version attribute & removing the output one
# Filtering only the first line in case of other information
# exist on additional lines (commit,...)
attr(err_status, "version") <- gsub(
pattern = "Modulostics version : ",
x = trimws(attr(err_status, "output")),
x = trimws(attr(err_status, "output")[1]),
replacement = ""
)
attr(err_status, "output") <- NULL
Expand Down

0 comments on commit 85d39bf

Please sign in to comment.