Skip to content

Commit 0dc5414

Browse files
committed
Restore immediate deletion of transient .quarto_ipynb after execution
When keep-ipynb is false (the default), cleanupNotebook() now calls safeRemoveSync() to delete the intermediate .quarto_ipynb file immediately after execution, restoring the original behavior from 2021 that was inadvertently dropped when keep-ipynb support was added in PR #12793.
1 parent 5383c96 commit 0dc5414

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/execute/jupyter/jupyter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { basename, dirname, join, relative } from "../../deno_ral/path.ts";
88
import { satisfies } from "semver/mod.ts";
99

10-
import { existsSync } from "../../deno_ral/fs.ts";
10+
import { existsSync, safeRemoveSync } from "../../deno_ral/fs.ts";
1111

1212
import { error, info } from "../../deno_ral/log.ts";
1313

@@ -870,6 +870,8 @@ function cleanupNotebook(
870870
if (cached.target && cached.target.data) {
871871
(cached.target.data as JupyterTargetData).transient = false;
872872
}
873+
} else if (data.transient) {
874+
safeRemoveSync(target.input);
873875
}
874876
}
875877

0 commit comments

Comments
 (0)