MCPcopy Create free account
hub / github.com/coder/mux / buildRuntimeTempPath

Function buildRuntimeTempPath

src/node/services/tools/task_apply_git_patch.ts:678–689  ·  view source on GitHub ↗
(params: {
  runtimeTempDir: string;
  filename: string;
  purpose: string;
})

Source from the content-addressed store, hash-verified

676}
677
678function buildRuntimeTempPath(params: {
679 runtimeTempDir: string;
680 filename: string;
681 purpose: string;
682}): string {
683 const runtimePath = path.posix.join(params.runtimeTempDir, params.filename);
684 assert(
685 isPathInsideDir(params.runtimeTempDir, runtimePath),
686 `task_apply_git_patch ${params.purpose} path must stay inside runtimeTempDir`
687 );
688 return runtimePath;
689}
690
691interface GitStatusPorcelainEntry {
692 path: string;

Callers 1

applyProjectPatchFunction · 0.85

Calls 2

isPathInsideDirFunction · 0.90
assertFunction · 0.50

Tested by

no test coverage detected