R vs Rscript in R 3.4.3 on Windows


#1

I have a build script that does the following:

R -e "try(remove.packages('synapser'), silent=T)"

When running R 3.4.2, this works fine. After switching to R 3.4.3, I got this error:

C:\>R -e "try(remove.packages('synapser'), silent=T)"
'C:\bin\R\bin\x64\R.exe" -e "try' is not recognized as an internal or external command,
operable program or batch file.

Explicitly specifying the path to Rscript works, while quickly change to call Rscript does not work:

C:\>Rscript -e "try(remove.packages('synapser'), silent=T)"
'C:\bin\R\bin\x64\Rscript.exe" -e "try' is not recognized as an internal or external command,
operable program or batch file.

C:\>C:\bin\R\bin\x64\Rscript.exe -e "try(remove.packages('synapser'), silent=T)"
Removing package from 'C:/bin/R/library'
(as 'lib' is unspecified)

Notes that while I did not specify the full path, it looks like it tries to access the .exe file at the correct path. But still thrown an error.

Could this be fixed? Or is there a work around that allow me to use shortcuts instead of specifying the fullpath?

Thanks