Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion news/changelog-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ All changes included in 1.6:
- Upgrade `mermaidjs` to 11.2.0.
- Upgrade Pandoc to 3.4.
- Upgrade `deno` to 1.46.3.
- ([#11068](https://github.com/quarto-dev/quarto-cli/issues/11068)): use standard location when writing to standard output to avoid breakage under `self-contained: true`.
- ([#10162](https://github.com/quarto-dev/quarto-cli/issues/10162)): Use Edge on `macOS` as a Chromium browser when available.
- ([#10235](https://github.com/quarto-dev/quarto-cli/issues/10235)): Configure the CI schedule trigger to activate exclusively for the upstream repository.
- ([#10295](https://github.com/quarto-dev/quarto-cli/issues/10235)): Fix regression to return error status to shell when `CommandError` is thrown.
Expand All @@ -103,6 +102,8 @@ All changes included in 1.6:
- ([#10581](https://github.com/quarto-dev/quarto-cli/issues/10581)): Add `.landscape` div processing to `typst`, `docx` and `pdf` formats to support pages in landscape orientation.
- ([#10591](https://github.com/quarto-dev/quarto-cli/issues/10591)): Make fenced div syntax slightly more robust by removing spaces around the `=` sign ahead of Pandoc's reader.
- ([#10608](https://github.com/quarto-dev/quarto-cli/issues/10608)): Don't overwrite the built-in CSS function `contrast` in Quarto's SCSS.
- ([#10622](https://github.com/quarto-dev/quarto-cli/issues/10622)): Use copy+remove instead of move when needed to support temporary directories in different filesystems.
- ([#10821](https://github.com/quarto-dev/quarto-cli/issues/10821)): Be more conservative in stripping `echo: fenced` from fenced output.
- ([#10890](https://github.com/quarto-dev/quarto-cli/issues/10890)): Don't use ports that Firefox considers unsafe.
- ([#10936](https://github.com/quarto-dev/quarto-cli/issues/10936)): Use `\\` in `meta` shortcode to escape the following character, allowing keys with `.` in them.
- ([#11068](https://github.com/quarto-dev/quarto-cli/issues/11068)): use standard location when writing to standard output to avoid breakage under `self-contained: true`.
25 changes: 17 additions & 8 deletions src/command/render/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,24 @@ export async function renderProject(
// remove directories, we should instead make a function that
// does that explicitly, rather than as a side effect of a missing
// src Dir
if (existsSync(srcDir)) {
if (existsSync(targetDir)) {
Deno.removeSync(targetDir, { recursive: true });
}
ensureDirSync(dirname(targetDir));
if (copy) {
copyTo(srcDir, targetDir);
} else {
if (!existsSync(srcDir)) {
return;
}
if (existsSync(targetDir)) {
Deno.removeSync(targetDir, { recursive: true });
}
ensureDirSync(dirname(targetDir));
if (copy) {
copyTo(srcDir, targetDir);
} else {
try {
Deno.renameSync(srcDir, targetDir);
} catch (_e) {
// if renaming failed, it could have happened
// because src and target are in different file systems.
// In that case, try to recursively copy from src
copyTo(srcDir, targetDir);
Deno.removeSync(srcDir, { recursive: true });
}
}
};
Expand Down
Loading