Skip to content

Commit

Permalink
Use matching filename for shiny app file
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Oct 9, 2023
1 parent 48795e9 commit 5ad97e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/execute/jupyter/jupyter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,13 @@ export const jupyterEngine: ExecutionEngine = {

run: async (options: RunOptions): Promise<void> => {
let running = false;
const appFile = options.input.replace(".qmd", "-app.py");
const result = await execProcess(
{
cmd: [
"shiny",
"run",
appFile,
"--host",
options.host,
"--port",
Expand Down
5 changes: 2 additions & 3 deletions src/resources/filters/quarto-pre/shiny.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ function server_shiny()
file:write(quarto.json.encode(codeCells))
file:close()

-- Convert the json file to an app.py by calling `shiny convert-cells`.
-- appOutfile = pandoc.path.split_extension(pandoc.path.filename(quarto.doc.output_file)) .. "-app.py"
appOutfile = pandoc.path.directory(quarto.doc.output_file) .. "/app.py"
-- Convert the json file to myfile-app.py by calling `shiny convert-cells`.
appOutfile = pandoc.path.split_extension(quarto.doc.output_file) .. "-app.py"
callPythonShiny(
{ "cells-to-app", codeCellsOutfile, appOutfile }
)
Expand Down

0 comments on commit 5ad97e0

Please sign in to comment.