I have a problem with bash code chunks in RStudio Server on Linux Ubuntu 18.04.
Specifically, I would like the .bashrc to be sourced in each bash code chunk, both to define the $PATH and for running some scripts in the .bashrc file.
None of the following two options works for me:
{bash engine.opts='-l'}
source ~/.bashrc inside the bash chunk
Note that on Mac OS the latter works fine.
Using engine.opts='-i' does the job, but it also returns warnings that cannot be hidden with warnings=F:
bash: cannot set terminal process group (19193): Inappropriate ioctl for device
bash: no job control in this shell
As a last option, I now resourced to creating a text file called ~/rpath where I put my path definition and the scripts I need to be run. This file can actually be sourced inside the bash code chunk. However I would prefer a cleaner solution.
Can anybody help me with that?
Yes you are right.
I just posted it here for referencing. If it is a known bug it is could to know and if someone want to contribute, it could be done there.
Actually that's the first thing I tried, but indeed it does not give the expected results.
I repeated exactly the code you gave me.
Interestingly, on Mac OS it does the job.