File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,21 @@ jobs:
100100 with :
101101 r-version : ${{ matrix.r }}
102102
103+ - name : Override R for locale-specific check
104+ if : matrix.os == 'ubuntu-latest' && !contains(matrix.locale, 'utf8')
105+ run : |
106+ R_BIN_DIR=$(Rscript -e 'cat(R.home("bin"))')
107+ for bin in R Rscript; do
108+ target="${R_BIN_DIR}/${bin}"
109+ sudo mv "$target" "${target}.orig"
110+ sudo tee "$target" << EOF
111+ #!/bin/bash
112+ set -o pipefail
113+ exec "${target}.orig" "\$@" 2>&1 | iconv -c -t UTF-8
114+ EOF
115+ sudo chmod +x "$target"
116+ done
117+
103118 - name : Set script permissions
104119 run : chmod +x configure cleanup 2>/dev/null || true # Silence some GHA Annotations
105120 shell : bash
@@ -190,7 +205,7 @@ jobs:
190205 stop("R CMD check failed")
191206 }
192207 }
193- shell : bash -c 'set -o pipefail; Rscript {0} 2>&1 | iconv -c -t UTF-8'
208+ shell : Rscript {0}
194209
195210 - name : Upload check results
196211 if : failure()
You can’t perform that action at this time.
0 commit comments