Skip to content

Commit f17d5fa

Browse files
committed
fix: address ESLint errors in framework
- executor.ts: add env:undefined to execSync calls for security - latex-renderer.ts: provide default value for toFixed decimals
1 parent 8074c66 commit f17d5fa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/experiments/framework/executor/executor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ const getProvenance = (collectProvenance: boolean): Provenance => {
141141
let dirty = false;
142142

143143
try {
144-
gitCommit = execSync("git rev-parse HEAD", { encoding: "utf-8" }).trim();
145-
const status = execSync("git status --porcelain", { encoding: "utf-8" });
144+
gitCommit = execSync("git rev-parse HEAD", { encoding: "utf-8", env: undefined }).trim();
145+
const status = execSync("git status --porcelain", { encoding: "utf-8", env: undefined });
146146
dirty = status.length > 0;
147147
} catch {
148148
// Git not available or not a git repo

src/experiments/framework/renderers/latex-renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ ${rows.join("\n")}
222222
if (!Number.isFinite(n)) {
223223
return "--";
224224
}
225-
return n.toFixed(decimals ?? this.options.defaultDecimals);
225+
return n.toFixed(decimals ?? this.options.defaultDecimals ?? 2);
226226
}
227227

228228
/**

0 commit comments

Comments
 (0)