### Bug description

1.  Create a new Quarto project using the RStudio IDE. Let's call it `~/Desktop/qp`.

    This project needs to be within a directory that RStudio can access, but is not allowed to the Terminal.app. On my laptop, the `~/Desktop` directory fits this criteria. The Security&Privacy / Privacy / Files and Folders preferences can be adjusted so RStudio can create a project beneath the Desktop without allowing Terminal access.

2.  Start the Terminal.app. Change directory into the `~/Desktop/qp` directory. If the system asks for desktop access, do not allow it.

    ```bash
    cd ~/Desktop/qp
    ```

    Interestingly, the `cd` command succeeds even though things like `ls` fail.

3. Attempt any Quarto operation within this restricted directory:

    ```bash
    quarto render index.qmd
    ```

The resulting output:

```default
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos x86_64
Version: 1.22.0
Args: ["/Users/aron/dev/rstudio/quarto-cli/package/dist/bin/tools/deno", "run", "--unstable", "--cached-only", "--allow-read", "--allow-write", "--allow-run", "--allow-env", "--allow-net", "--allow-ffi", "--importmap=/Users/aron/dev/rstudio/quarto-cli/src/dev_import_map.json", "/Users/aron/dev/rstudio/quarto-cli/src/quarto.ts", "render", "index.qmd"]

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', core/module_specifier.rs:141:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

### `quarto check` Output

The `quarto check` command did not succeed within the restricted directory. It erred with the same output as above.

When run from a different directory:

```default

[✓] Checking Quarto installation......OK
      Version: 99.9.9
      Path: /Users/aron/dev/rstudio/quarto-cli/package/dist/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.9
      Path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3
      Jupyter: (None)

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

[✓] Checking R installation...........OK
      Version: 3.6.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/aron/Library/R/3.6/library
        - /Library/Frameworks/R.framework/Versions/3.6/Resources/library
      rmarkdown: 2.11.16

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

This issue was confirmed while using commit 852a0231c043417a0f848faed90af1116a2c8fb4. It occurs in earlier versions, as well.

Tested on macOS Monterey - 12.4

Quarto website project was created using RStudio 2022.07.0 Build 548

### `quarto tools check` Output

The `quarto tools check` command did not succeed within the restricted directory. It erred with the same output as above.

When run from a different directory:

```default
[✓] Inspecting tools

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.07
```

### Checklist

- [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.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] 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.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-07-13T17:03:52Z
aronatkins
bug
Future
open
Deno panic when directory access not permitted
https://github.com/quarto-dev/quarto-cli/issues/1379