Skip to content

Commit

Permalink
the backtick version whoami no longer works (at least on my new mac…
Browse files Browse the repository at this point in the history
…OS), so get the user name from system2() instead
  • Loading branch information
yihui committed Sep 29, 2023
1 parent 6449b43 commit 8af916a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tinytex
Type: Package
Title: Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents
Version: 0.47.1
Version: 0.47.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person(given = "Posit Software, PBC", role = c("cph", "fnd")),
Expand Down
3 changes: 2 additions & 1 deletion R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ check_local_bin = function() {
'See https://github.com/rstudio/tinytex/issues/24 for more info.'
)
if (!dir_exists(p)) osascript(paste('mkdir -p', p))
osascript(paste('chown -R `whoami`:admin', p))
user = system2('whoami', stdout = TRUE)
osascript(sprintf('chown -R %s:admin %s', user, p))
}

osascript = function(cmd) {
Expand Down

0 comments on commit 8af916a

Please sign in to comment.