<!--
Welcome to the quarto GitHub repo!

We are always happy to hear feedback from our users.

To file a _bug report_, please follow these instructions carefully: <https://yihui.org/issue/#bug-reports>

Also, please complete and keep the checklist below in your issue. This helps you know what to check for opening a good issue report. It also helps know that you've have done the common steps that can solve your potential issue.

At last, if you have posted the same issue elsewhere, please mention it here, with a link to the other issue.

-->

## Task

```bash
tree quarto/
.
├── _quarto.yml
├── code
│   └── quarto.qmd
├── data
│   └── names.csv
├── quarto.Rproj
└── renv.lock
```

Set `execute-dir: project` in `_quarto.yml`.
Read file `data/names.csv` from `code/quarto.qmd`, interactively.

→ Reproducible example: [quarto.zip](https://github.com/quarto-dev/quarto-cli/files/8837360/quarto.zip)


## Expected result

`data/names.csv` is read when running the code chunk interactively.

## Error

```
Error: './data/names.csv' does not exist in current working directory ('/Users/xxx/quarto/code').
```

However, rendering the `.qmd` file works fine.

## Session info

```
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.4, RStudio 2022.2.3.492

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  askpass_1.1         assertthat_0.2.1    backports_1.4.1     base64enc_0.1.3     bit_4.0.4           bit64_4.0.5        
  blob_1.2.3          broom_0.8.0         bslib_0.3.1         callr_3.7.0         cellranger_1.1.0    cli_3.3.0          
  clipr_0.8.0         colorspace_2.0-3    compiler_4.2.0      cpp11_0.4.2         crayon_1.5.1        curl_4.3.2         
  data.table_1.14.2   DBI_1.1.2           dbplyr_2.1.1        digest_0.6.29       dplyr_1.0.9         dtplyr_1.2.1       
  ellipsis_0.3.2      evaluate_0.15       fansi_1.0.3         farver_2.1.0        fastmap_1.1.0       forcats_0.5.1      
  fs_1.5.2            gargle_1.2.0        generics_0.1.2      ggplot2_3.3.6       glue_1.6.2          googledrive_2.0.0  
  googlesheets4_1.0.0 graphics_4.2.0      grDevices_4.2.0     grid_4.2.0          gtable_0.3.0        haven_2.5.0        
  highr_0.9           hms_1.1.1           htmltools_0.5.2     httr_1.4.3          ids_1.0.1           isoband_0.2.5      
  jquerylib_0.1.4     jsonlite_1.8.0      knitr_1.39          labeling_0.4.2      lattice_0.20.45     lifecycle_1.0.1    
  lubridate_1.8.0     magrittr_2.0.3      MASS_7.3.57         Matrix_1.4.1        methods_4.2.0       mgcv_1.8.40        
  mime_0.12           modelr_0.1.8        munsell_0.5.0       nlme_3.1.157        openssl_2.0.2       parallel_4.2.0     
  pillar_1.7.0        pkgconfig_2.0.3     prettyunits_1.1.1   processx_3.5.3      progress_1.2.2      ps_1.7.0           
  purrr_0.3.4         R6_2.5.1            rappdirs_0.3.3      RColorBrewer_1.1.3  readr_2.1.2         readxl_1.4.0       
  rematch_1.0.1       rematch2_2.1.2      renv_0.15.5         reprex_2.0.1        rlang_1.0.2         rmarkdown_2.14     
  rstudioapi_0.13     rvest_1.0.2         sass_0.4.1          scales_1.2.0        selectr_0.4.2       splines_4.2.0      
  stats_4.2.0         stringi_1.7.6       stringr_1.4.0       sys_3.4             tibble_3.1.7        tidyr_1.2.0        
  tidyselect_1.1.2    tidyverse_1.3.1     tinytex_0.39        tools_4.2.0         tzdb_0.3.0          utf8_1.2.2         
  utils_4.2.0         uuid_1.1.0          vctrs_0.4.1         viridisLite_0.4.0   vroom_1.5.7         withr_2.5.0        
  xfun_0.31           xml2_1.3.3          yaml_2.3.5    
``` 

## Quarto check output

```
[✓] Checking Quarto installation......OK
      Version: 0.9.501
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.13
      Path: /opt/homebrew/opt/python@3.9/bin/python3.9
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.2.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/ste/Library/Caches/org.R-project.R/R/renv/library/tidygam-a6f3cf04/R-4.2/aarch64-apple-darwin20
        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
```

## Checklist

When filing a _bug report_, please check the boxes below to confirm that you have provided us with the information we need. Have you:

- [x] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?

- [x] included a minimal, self-contained, and reproducible example?

- [x] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?

- [x] upgraded to the latest version (including your versions of R, the RStudio IDE, and relevant R packages)?

2022-06-04T09:28:51Z
stefanocoretta
closed
execute-dir is not honoured when running interactively
https://github.com/quarto-dev/quarto-cli/issues/1059