Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed installation of chrome system requirement #347

Closed
cderv opened this issue Dec 20, 2021 · 2 comments · Fixed by rstudio/r-system-requirements#94
Closed

Failed installation of chrome system requirement #347

cderv opened this issue Dec 20, 2021 · 2 comments · Fixed by rstudio/r-system-requirements#94
Labels
bug an unexpected problem or unintended behavior

Comments

@cderv
Copy link
Contributor

cderv commented Dec 20, 2021

This issue occured in a recent workflow (https://github.com/rstudio/blogdown/runs/4580524115?check_suite_focus=true#step:5:2942)

ℹ Executing `sudo [ -e /tmp/google-chrome.deb ] && rm /tmp/google-chrome.deb`
  
  Error: Error: <callr_remote_error: System command 'sh' failed, exit status: 1, stdout + stderr empty>
   in process 8955 
  -->
  System command 'sh' failed, exit status: 1, stdout + stderr empty

I believe this comes from webshot2 which uses chromote. However, on GHA google-chrome should already be available.

I don't really know how all this happens but the rules followed must be this one:
https://github.com/rstudio/r-system-requirements/blob/master/rules/chrome.json

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Dec 20, 2021
@gaborcsardi
Copy link
Member

Yes, we cannot just prepend sudo to the command coming from the system requirements DB, apparently. Maybe we should run the shell in sudo instead:

❯ sudo false || id -u
501

~/works/pkgbuild main
❯ sudo sh -c 'false || id -u'
0

gaborcsardi added a commit to gaborcsardi/r-system-requirements that referenced this issue Dec 20, 2021
With the original
```
[ -e /tmp/google-chrome.deb ] && rm /tmp/google-chrome.deb"
```
code, if chrome was already installed, and thus it was not
downloaded to `/tmp/google-chrome.deb`, the test post-install
expression returns with a non-zero status, which is considered
a failure.

Fixes r-lib/pak#347
gaborcsardi added a commit to r-lib/pkgdepends that referenced this issue Dec 20, 2021
Run the sysreqs command in a single shell.
Instead of just prepending `sudo` to it.

Towards r-lib/pak#347
@gaborcsardi
Copy link
Member

This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants