Attempt to fix rscript for Linux

This commit is contained in:
Glavin Wiechert 2017-06-11 22:22:56 -03:00
parent 2737a54604
commit 13601a38b3
2 changed files with 4 additions and 3 deletions

View File

@ -107,6 +107,7 @@ before_install:
# R # R
- brew tap homebrew/science - brew tap homebrew/science
- brew install r - brew install r
- rscript --version
# PHP # PHP
- brew tap homebrew/homebrew-php - brew tap homebrew/homebrew-php
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then

View File

@ -12,7 +12,7 @@ module.exports = class R extends Beautifier
executables: [ executables: [
{ {
name: "Rscript" name: "Rscript"
cmd: "Rscript" cmd: "rscript"
homepage: "https://github.com/yihui/formatR" homepage: "https://github.com/yihui/formatR"
installation: "https://github.com/yihui/formatR" installation: "https://github.com/yihui/formatR"
version: { version: {
@ -32,9 +32,9 @@ module.exports = class R extends Beautifier
} }
beautify: (text, language, options) -> beautify: (text, language, options) ->
rScript = @exe("Rscript") rscript = @exe("rscript")
r_beautifier = path.resolve(__dirname, "formatR.r") r_beautifier = path.resolve(__dirname, "formatR.r")
rScript.run([ rscript.run([
r_beautifier, r_beautifier,
options.indent_size, options.indent_size,
@tempFile("input", text), @tempFile("input", text),