Skip to content

Commit

Permalink
Use quarto.config.cli_path() from Quarto 1.5.32+ to get the path to…
Browse files Browse the repository at this point in the history
… the Quarto CLI executable.

Otherwise, this extension fails to call `quarto run` on environment where `quarto` is not in the PATH. Though, even if in the PATH, it could be calling another quarto CLI that the one used to run the extension
  • Loading branch information
cderv committed May 3, 2024
1 parent 213a995 commit 644d4b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _extensions/quarto-ext/shinylive/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: shinylive
title: Embedded Shinylive applications
author: Winston Chang
version: 0.1.0
quarto-required: ">=1.2.198"
version: 0.2.0
quarto-required: ">= 1.5.32"
contributes:
filters:
- shinylive.lua
6 changes: 5 additions & 1 deletion _extensions/quarto-ext/shinylive/shinylive.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
-- Notes:
-- * 2024/05/03 - Christophe:
-- `quarto run` needs to be called using the same quarto CLI that called the extension.
-- This is done by using `quarto.cli_path` from Quarto 1.5 Lua API.
-- * 2023/10/04 - Barret:
-- Always use `callShinyLive()` to call a shinylive extension.
-- `callPythonShinyLive()` and `callRShinyLive()` should not be used directly.
Expand Down Expand Up @@ -415,7 +418,8 @@ return {

-- Convert code block to JSON string in the same format as app.json.
local parsedCodeblockJson = pandoc.pipe(
"quarto",
-- Use quarto binary that called this extension
quarto.config.cli_path(),
{ "run", codeblockScript, language },
el.text
)
Expand Down

0 comments on commit 644d4b7

Please sign in to comment.