Skip to content

Commit 52d39c1

Browse files
committed
LUA Dendependencies - Hide File Path
encode the file path to hide it from the environment variables
1 parent 55ddff0 commit 52d39c1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/command/render/filters.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ import { kJatsSubarticle } from "../../format/jats/format-jats-types.ts";
8787
import { shortUuid } from "../../core/uuid.ts";
8888
import { isServerShinyPython } from "../../core/render.ts";
8989
import { pythonExec } from "../../core/jupyter/exec.ts";
90+
import { encode as base64Encode } from "encoding/base64.ts";
9091

9192
const kQuartoParams = "quarto-params";
9293

@@ -682,7 +683,7 @@ function initFilterParams(dependenciesFile: string) {
682683
Deno.env.set("QUARTO_WIN_CODEPAGE", value);
683684
}
684685
}
685-
Deno.env.set("QUARTO_FILTER_DEPENDENCY_FILE", dependenciesFile);
686+
Deno.env.set("QUARTO_FILTER_DEPENDENCY_FILE", base64Encode(dependenciesFile));
686687
return params;
687688
}
688689

src/resources/pandoc/datadir/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ local function dependenciesFile()
14931493
if dependenciesFile == nil then
14941494
error('Missing expected dependency file environment variable QUARTO_FILTER_DEPENDENCY_FILE')
14951495
else
1496-
return pandoc.utils.stringify(dependenciesFile)
1496+
return quarto.base64.decode(dependenciesFile)
14971497
end
14981498
end
14991499

0 commit comments

Comments
 (0)