### Bug description

I was trying to publish a document contained in a subfolder to Quarto Pub, e.g.

```
quarto publish quarto-pub folder/test.qmd
```

The structure is:

```
.
└── folder
    └── test.qmd
```

And the content of `folder/test.qmd` is not important, e.g.

```
---
engine: jupyter
---

## Test

This is a simple test file.
```

But this didn't work, because after entering the account and document name, I got this error:

```
ERROR: NotFound: No such file or directory (os error 2), stat 'folder/folder/test_files/libs'
```

FWIW, this was a document rendered with the `jupyter` engine (but I get the same error with `knitr`), and I was running Quarto 1.1.251 on macOS.

Also, `quarto preview folder/test.qmd` is working, and publishing from within the `folder` also works.

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
jjallaire
2022-09-27T08:12:16Z
cbrnr
bug
v1.2
closed
quarto publish in subfolder fails
https://github.com/quarto-dev/quarto-cli/issues/2623