Skip to content

Commit 3cd2111

Browse files
committed
Avoid duplicating name
1 parent 9abd4db commit 3cd2111

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/publish/gh-pages/gh-pages.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ async function publish(
191191
type === "site" ? target?.url : undefined,
192192
);
193193

194+
const kPublishWorktreeDir = "quarto-publish-worktree-";
194195
// allocate worktree dir
195196
const temp = createTempContext(
196-
{ prefix: "quarto-publish-worktree-", dir: projectScratchPath(input) },
197+
{ prefix: kPublishWorktreeDir, dir: projectScratchPath(input) },
197198
);
198199
const tempDir = temp.baseDir;
199200
removeIfExists(tempDir);
@@ -202,7 +203,7 @@ async function publish(
202203
const worktreeDir = Deno.readDirSync(projectScratchPath(input));
203204
for (const entry of worktreeDir) {
204205
if (
205-
entry.isDirectory && entry.name.startsWith("quarto-publish-worktree-")
206+
entry.isDirectory && entry.name.startsWith(kPublishWorktreeDir)
206207
) {
207208
debug(
208209
`Cleaning up leftover worktree folder ${entry.name} from past deploys`,

0 commit comments

Comments
 (0)