### Bug description

I don't know what `xfun::session_info()` is, hopefully the GH issue works without that?? (from the link with instructions to follow...)

I am following this tutorial:

https://quarto.org/docs/get-started/authoring/jupyter.html

and am using `nb_conda_kernel` to manage my Jupyter kernels from different environments.
This leads to notebook metadata having different kernelspec metadata than what are available.

However, this should not matter, as the YAML doc options should precede those kind of findings, but I find that that is not the case.

Here's my whole notebook:

```json
{
 "cells": [
  {
   "cell_type": "raw",
   "id": "563ca2fc-b9a0-4e94-ab33-a511b79debe4",
   "metadata": {},
   "source": [
    "---\n",
    "title: \"Quarto Document\"\n",
    "author: \"Michael Aye\"\n",
    "toc: true\n",
    "number-sections: true\n",
    "highlight-style: pygments\n",
    "format:\n",
    "  html:\n",
    "    code-fold: false\n",
    "    html-math-method: katex\n",
    "  pdf:\n",
    "    geometry:\n",
    "      - top=30mm\n",
    "      - left=20mm\n",
    "  docx: default  \n",
    "jupyter: python3\n",
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "86065445-3aab-4e52-ad26-2edf63ff1670",
   "metadata": {},
   "source": [
    "# Test\n",
    "\n",
    "This is a test."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a5fa2a9c-093f-4558-a4b9-686e684c6d59",
   "metadata": {},
   "outputs": [],
   "source": [
    "2+2"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:py310] *",
   "language": "python",
   "name": "conda-env-py310-py"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
```

Here are the available kernels, note the matching `python3` kernel name, fitting the doc options.

```bash
/Dropbox/src/quarto_hello ❯ jupyter kernelspec list
[ListKernelSpecs] WARNING | Config option `kernel_spec_manager_class` not recognized by `ListKernelSpecs`.
Available kernels:
  python3    /home/ayek72/mambaforge/envs/py310/share/jupyter/kernels/python3
  xonsh      /usr/share/jupyter/kernels/xonsh
```
and here's what `quarto` says:

```
~/Dropbox/src/quarto_hello ❯ quarto render formats.ipynb --to html --execute
ERROR: 

No such kernel named conda-env-py310-py
```

For reference, here's my output of `quarto check`:
```bash
~/Dropbox/src/quarto_hello ❯ quarto check

[✓] Checking Quarto installation......OK
      Version: 1.0.37
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.5 (Conda)
      Path: /home/ayek72/mambaforge/envs/py310/bin/python
      Jupyter: 4.11.1
      Kernels: python3, xonsh

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

```

I don't know what a QMD file is, but with above notebook json and the commands, it should be easily reproducible. It simply seems to be the case that `quarto` looks at the notebook metadata first instead of looking at the YAML docoptions first.

## OS

```
~/Dropbox/src/quarto_hello ❯ uname -a
Linux apollo.planet.fu-berlin.de 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
Running a KDE Neon : 
![image](https://user-images.githubusercontent.com/69774/186401244-b94bbd27-83eb-40d3-af9d-050bfd04aa3b.png)


### Checklist

- [ ] upgraded to the [latest nightly quarto version](https://github.com/quarto-dev/quarto-cli/releases)?
- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [ ] included 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.
- [ ] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
jjallaire
2022-08-24T10:55:16Z
michaelaye
bug
v1.2
closed
quarto --execute ignores jupyter kernel name in yaml doc options
https://github.com/quarto-dev/quarto-cli/issues/2091