quarto-dev / quarto-dev/quarto

Quarto extension errors calling pandoc citeproc with file in iCloud storage or with ~ in directory name

Open
#924 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug vscode
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Bug description

When using the quarto extension in source mode in a directory with tilde characters embedded in the path name (i.e. a directory on the path has tildes in the name like Foo/tilde~in~name/bug/ ) autocomplete for bibliography fails and spews errors into the Output pane, because the file path is mangled on call to pandoc.

stderr: 'pandoc: /Users/yourname/Foo/tildeinname/bug/minibib.bib: withBinaryFile: does not exist (No such file or directory)\n'

Somehow the ~ is getting stripped from the path before you send a modified version of the file to pandoc. It wouldn't matter except that iCloud storage uses the convention

~/Library/iCloud~md~obsidian/

and I use Obsidian to sync dir with both .md and .qmd files in it.

Note that quarto render works fine

Steps to reproduce

Create a directory tree like this Foo/tilde~in~name/bug

Note that there's a directory in there with a tilde embedded in the name. In the bug directory create test.qmd with this content

---
bibliography: minibib.bib
---

Create the file minibib.bib with valid BibLaTex content like this

@book{durkheim1995,
  title = {The {{Elementary Forms}} of {{Religious Life}}},
  author = {Durkheim, Emile},
  date = {1995-06-01},
  origdate = {1912},
}

In test.qmd type

[@d
Actual behavior

Got error in output

pandoc: /Users/name/Foo/tildeinname/bug/minibib.bib: withBinaryFile: does not exist (No such file or directory)

    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at checkExecSyncError (node:child_process:930:11)
    at Object.execFileSync (node:child_process:966:15)
    at Object.func (node:electron/js2c/node_init:2:2617)
    at M8 (/Users/name/.positron/extensions/quarto.quarto-1.130.0-universal/out/lsp/lsp.js:122:14901)
    at Object.runPandoc (/Users/name/.positron/extensions/quarto.quarto-1.130.0-universal/out/lsp/lsp.js:122:43358)
    at sqe (/Users/name/.positron/extensions/quarto.quarto-1.130.0-universal/out/lsp/lsp.js:348:16)
    at oqe (/Users/name/.positron/extensions/quarto.quarto-1.130.0-universal/out/lsp/lsp.js:347:1258)
    at B3e.i.bibliographies.length.i.bibliographies.reduce.cslRefs (/Users/name/.positron/extensions/quarto.quarto-1.130.0-universal/out/lsp/lsp.js:347:688) {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'pandoc: /Users/name/Foo/tildeinname/bug/minibib.bib: withBinaryFile: does not exist (No such file or directory)\n'
  ],
  pid: 3276,
  stdout: '',
  stderr: 'pandoc: /Users/name/Foo/tildeinname/bug/minibib.bib: withBinaryFile: does not exist (No such file or directory)\n'
}

Expected behavior

Autocomplete the reference name and no error

Your environment

Version: Positron 2026.02.1+5 (693b6d13ba5d61566bec7f5a4a46126eff7bbbe1, 2026-02-10T19:05:16.756Z)
Code - OSS version: VS Code 1.106.0
OS version: Darwin arm64 25.2.0
Modes:

System Info
Item Value
CPUs Apple M1 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 9, 6, 6
Memory (System) 32.00GB (1.04GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (17)
Extension Author (truncated) Version
ruff cha 2026.36.0
vscode-pull-request-github Git 0.120.2
todo-tree Gru 0.0.215
vscode-edit-csv jan 0.11.8
pyrefly met 0.53.0
debugpy ms- 2025.18.0
vscode-python-envs ms- 1.16.0
jupyter ms- 2025.9.1
jupyter-keymap ms- 1.1.2
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
air-vscode Pos 0.20.0
publisher pos 1.31.8
shiny Pos 1.3.3
quarto qua 1.130.0
code-spell-checker str 4.5.6
open-in-external-app YuT 0.11.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Quarto extension's source-mode bibliography autocomplete path that invokes pandoc, using the lsp.js stack trace and the provided reproduction as entry points. Reproduce with a directory containing embedded tildes and test.qmd plus minibib.bib. Done means citation autocomplete succeeds without an Output-pane error while quarto render continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.