I have a program to run in a schroot environment. I can run like this without an error:
user@precise:~$ schroot -c trusty
(trusty)user@precise:~$ myprogram.sh my.Rmd
However, when I call the script in one go like following, it fails:
schroot -c trusty -- myprogram.sh my.Rmd
Error message:
Error in yaml::yaml.load(enc2utf8(string), ...) :
Scanner error: mapping values are not allowed in this context at line 2, column 7
Calls: render ... yaml_load_utf8 -> mark_utf8 -> <Anonymous> -> .Call
Execution halted
I think somehow the environment variables of the chroot are not provided correctly for the program.
This is the program by the way:
#!/bin/bash
# myprogram.sh
# This is run inside a chroot
/usr/bin/Rscript -e "library(rmarkdown); render('$1', 'all')"
0 Answers