Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .changeset/dev-session-store-dir.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---

Ensure the shared content-addressable store directory exists before writing so a second `trigger dev` session cannot crash after the previous session cleans it up.
4 changes: 4 additions & 0 deletions packages/cli-v3/src/utilities/fileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export async function createFileWithStore(
await fsModule.unlink(filePath);
}

// Ensure store directory exists. Concurrent `trigger dev` sessions share this
// path; the previous session's exit cleanup can delete it mid-build.
await fsModule.mkdir(storeDir, { recursive: true });

// Check if content already exists in store by hash
if (fsSync.existsSync(storePath)) {
// Create hardlink from build path to store path
Expand Down