File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,20 +92,19 @@ jobs:
9292 with :
9393 r-version : ${{ matrix.r }}
9494
95- - name : Override R for locale-specific check
95+ - name : Override Rscript for locale-specific check
9696 if : matrix.os == 'ubuntu-latest' && !contains(matrix.locale, 'utf8')
9797 run : |
98- R_BIN_DIR=$(Rscript -e 'cat(R.home(" bin"))')
99- for bin in R Rscript; do
100- target="${R_BIN_DIR}/${bin} "
101- sudo mv "$ target" "${target}.orig "
102- sudo tee "$target" << EOF
98+ RSCRIPT_PATH="$HOME/.local/ bin"
99+ mkdir -p "$RSCRIPT_PATH"
100+ echo "$RSCRIPT_PATH" >> "$GITHUB_PATH "
101+ target="$RSCRIPT_PATH/Rscript "
102+ tee "$target" << EOF
103103 #!/bin/bash
104104 set -o pipefail
105- exec "${target}.orig " "\$@" 2>&1 | iconv -c -t UTF-8
105+ exec "$(which Rscript) " "\$@" 2>&1 | iconv -c -t UTF-8
106106 EOF
107- sudo chmod +x "$target"
108- done
107+ chmod +x "$target"
109108
110109 - name : Set script permissions
111110 run : chmod +x configure cleanup 2>/dev/null || true # Silence some GHA Annotations
You can’t perform that action at this time.
0 commit comments