Run Current Chunk error, knitting works fine

rmarkdown
rstudio
knitr

#1

I'm using RStudio in Windows 10

I created a minimal example. Put this code in a random .Rmd file:

` ` `{bash}
echo hello world
pwd
` ` `

Knitting this document works perfectly fine.

But when I want to just run the specific chunk, it generates an error message:

/bin/bash: C:\Users\UserName\AppData\Local\Temp\RtmpwF2huT\chunk-code-6618365a64b8.txt: No such file or directory

Guess the working directory of bash is incorrect for the "Run Current Chunk" command. Any way to easily change it to the correct one? (WSL for me)