title: Github Action failing: Process completed with exit code 1 when installing system dependencies for R-CMD-Check
body: <p>I am trying to run the <code>use_github_action_check_standard()</code> command from the <code>usethis</code> R package to check my package on every push on GitHub Actions.</p>
  <p>The test <strong>works without a problem on Windows and MacOS</strong>, but for both Linux versions my workflow code fails before it even gets to the package code.</p>
  <p>It fails when it tries to install the system dependencies where it gives me the error <code>##[error]Process completed with exit code 1</code>.</p>
  <p>When I look at the raw logs (below), I notice the line:
  <code>Cache not found for input keys: Linux-287c850eb370edd647ed85b6fac18cbaee02effa7d01b981304dce84a452b22c-1-, Linux--1-.</code>
  But I'm afraid I don't understand that error. Also I don't think this is it, because the key appears in the group above (notice the <code>##[endgroup]</code>) already but the error only appears in the next group (as on the Screenshot).</p>
  <p>Any ideas? Many thanks!</p>
  <p>I also post my entire workflow code below.</p>
  <h1>Screenshot</h1>
  <p><a href="https://i.stack.imgur.com/CH1Kp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CH1Kp.png" alt="enter image description here" /></a></p>
  <h1>Raw Log</h1>
  <pre><code>2020-08-12T22:21:55.5243116Z ##[group]Run install.packages('remotes')
  2020-08-12T22:21:55.5243360Z [36;1minstall.packages('remotes')[0m
  2020-08-12T22:21:55.5243487Z [36;1msaveRDS(remotes::dev_package_deps(dependencies = TRUE), &quot;../.github/depends.Rds&quot;, version = 2)[0m
  2020-08-12T22:21:55.5243834Z [36;1mwriteLines(sprintf(&quot;R-%i.%i&quot;, getRversion()$major, getRversion()$minor), &quot;../.github/R-version&quot;)[0m
  2020-08-12T22:21:55.5250702Z shell: /usr/local/bin/Rscript {0}
  2020-08-12T22:21:55.5251247Z env:
  2020-08-12T22:21:55.5251370Z   R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
  2020-08-12T22:21:55.5251571Z   RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
  2020-08-12T22:21:55.5251726Z   R_LIBS_USER: /home/runner/work/_temp/Library
  2020-08-12T22:21:55.5251838Z   TZ: UTC
  2020-08-12T22:21:55.5251944Z   NOT_CRAN: true
  2020-08-12T22:21:55.5252036Z ##[endgroup]
  2020-08-12T22:21:55.7245517Z Installing package into ‘/home/runner/work/_temp/Library’
  2020-08-12T22:21:55.7246358Z (as ‘lib’ is unspecified)
  2020-08-12T22:22:10.8252493Z trying URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/remotes_2.2.0.tar.gz'
  2020-08-12T22:22:11.4785067Z Content type 'binary/octet-stream' length 385906 bytes (376 KB)
  2020-08-12T22:22:11.4972702Z ==================================================
  2020-08-12T22:22:11.4973457Z downloaded 376 KB
  2020-08-12T22:22:11.4973749Z 
  2020-08-12T22:22:11.7705424Z * installing *binary* package ‘remotes’ ...
  2020-08-12T22:22:11.7751638Z * DONE (remotes)
  2020-08-12T22:22:11.7952384Z 
  2020-08-12T22:22:11.7953131Z The downloaded source packages are in
  2020-08-12T22:22:11.7954176Z    ‘/tmp/RtmpnMfdtp/downloaded_packages’
  2020-08-12T22:22:28.2516191Z ##[group]Run actions/cache@v1
  2020-08-12T22:22:28.2516310Z with:
  2020-08-12T22:22:28.2516416Z   path: /home/runner/work/_temp/Library
  2020-08-12T22:22:28.2516545Z   key: Linux-287c850eb370edd647ed85b6fac18cbaee02effa7d01b981304dce84a452b22c-1-
  2020-08-12T22:22:28.2516663Z   restore-keys: Linux--1-
  2020-08-12T22:22:28.2516765Z env:
  2020-08-12T22:22:28.2516865Z   R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
  2020-08-12T22:22:28.2517041Z   RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
  2020-08-12T22:22:28.2517180Z   R_LIBS_USER: /home/runner/work/_temp/Library
  2020-08-12T22:22:28.2517288Z   TZ: UTC
  2020-08-12T22:22:28.2517383Z   NOT_CRAN: true
  2020-08-12T22:22:28.2517481Z ##[endgroup]
  2020-08-12T22:22:28.3670558Z Cache not found for input keys: Linux-287c850eb370edd647ed85b6fac18cbaee02effa7d01b981304dce84a452b22c-1-, Linux--1-.
  2020-08-12T22:22:28.3750527Z ##[group]Run while read -r cmd
  2020-08-12T22:22:28.3750930Z [36;1mwhile read -r cmd[0m
  2020-08-12T22:22:28.3751045Z [36;1mdo[0m
  2020-08-12T22:22:28.3751155Z [36;1m  eval sudo $cmd[0m
  2020-08-12T22:22:28.3751285Z [36;1mdone &lt; &lt;(Rscript -e 'cat(remotes::system_requirements(&quot;ubuntu&quot;, &quot;20.04&quot;), sep = &quot;\n&quot;)')[0m
  2020-08-12T22:22:28.3792540Z shell: /usr/bin/bash -e {0}
  2020-08-12T22:22:28.3792673Z env:
  2020-08-12T22:22:28.3792794Z   R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
  2020-08-12T22:22:28.3792990Z   RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
  2020-08-12T22:22:28.3793151Z   R_LIBS_USER: /home/runner/work/_temp/Library
  2020-08-12T22:22:28.3793268Z   TZ: UTC
  2020-08-12T22:22:28.3793377Z   NOT_CRAN: true
  2020-08-12T22:22:28.3793480Z ##[endgroup]
  2020-08-12T22:22:29.0943838Z usage: sudo -h | -K | -k | -V
  2020-08-12T22:22:29.0944936Z usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
  2020-08-12T22:22:29.0945856Z usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
  2020-08-12T22:22:29.0946223Z             [command]
  2020-08-12T22:22:29.0947040Z usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
  2020-08-12T22:22:29.0947710Z             prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [&lt;command&gt;]
  2020-08-12T22:22:29.0948381Z usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
  2020-08-12T22:22:29.0948992Z             prompt] [-T timeout] [-u user] file ...
  2020-08-12T22:22:29.0956330Z ##[error]Process completed with exit code 1.
  </code></pre>
  <h1>Workflow code:</h1>
  <pre><code># For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
  # https://community.rstudio.com/new-topic?category=Package%20development&amp;tags=github-actions
  on:
    push:
      branches:
        - master
    pull_request:
      branches:
        - master
  
  name: R-CMD-check
  
  jobs:
    R-CMD-check:
      runs-on: ${{ matrix.config.os }}
  
      name: ${{ matrix.config.os }} (${{ matrix.config.r }})
  
      strategy:
        fail-fast: false
        matrix:
          config:
            - {os: windows-latest, r: 'release'}
            - {os: macOS-latest, r: 'release'}
            - {os: ubuntu-20.04, r: 'release', rspm: &quot;https://packagemanager.rstudio.com/cran/__linux__/focal/latest&quot;}
            - {os: ubuntu-20.04, r: 'devel', rspm: &quot;https://packagemanager.rstudio.com/cran/__linux__/focal/latest&quot;}
  
      env:
        R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
        RSPM: ${{ matrix.config.rspm }}
      
     defaults:
        run:
          working-directory: myfunctionname
      steps:
        - uses: actions/checkout@v2
  
        - uses: r-lib/actions/setup-r@master
          with:
            r-version: ${{ matrix.config.r }}
  
        - uses: r-lib/actions/setup-pandoc@master
  
        - name: Query dependencies
          run: |
            install.packages('remotes')
            saveRDS(remotes::dev_package_deps(dependencies = TRUE), &quot;../.github/depends.Rds&quot;, version = 2)
            writeLines(sprintf(&quot;R-%i.%i&quot;, getRversion()$major, getRversion()$minor), &quot;../.github/R-version&quot;)
          shell: Rscript {0}
  
        - name: Cache R packages
          if: runner.os != 'Windows'
          uses: actions/cache@v1
          with:
            path: ${{ env.R_LIBS_USER }}
            key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('../.github/depends.Rds') }}
            restore-keys: ${{ runner.os }}-${{ hashFiles('../.github/R-version') }}-1-
  
        - name: Install system dependencies
          if: runner.os == 'Linux'
          run: |
            while read -r cmd
            do
              eval sudo $cmd
            done &lt; &lt;(Rscript -e 'cat(remotes::system_requirements(&quot;ubuntu&quot;, &quot;20.04&quot;), sep = &quot;\n&quot;)')
        - name: Install dependencies
          run: |
            remotes::install_deps(dependencies = TRUE)
            remotes::install_cran(&quot;rcmdcheck&quot;)
          shell: Rscript {0}
  
        - name: Check
          env:
            _R_CHECK_CRAN_INCOMING_REMOTE_: false
          run: rcmdcheck::rcmdcheck(args = c(&quot;--no-manual&quot;, &quot;--as-cran&quot;), error_on = &quot;warning&quot;, check_dir = &quot;check&quot;)
          shell: Rscript {0}
  
        - name: Upload check results
          if: failure()
          uses: actions/upload-artifact@main
          with:
            name: ${{ runner.os }}-r${{ matrix.config.r }}-results
            path: check
  </code></pre>