MCPcopy
hub / github.com/coder/mux / normalizeRepoRootProjectPath

Function normalizeRepoRootProjectPath

src/node/services/workspaceService.ts:487–494  ·  view source on GitHub ↗
(projectPath: string | null | undefined)

Source from the content-addressed store, hash-verified

485const MULTI_PROJECT_WORKSPACES_DISABLED_ERROR = "Multi-project workspaces experiment is disabled";
486
487function normalizeRepoRootProjectPath(projectPath: string | null | undefined): string {
488 const normalizedPath = projectPath?.replaceAll("\\", "/").trim() ?? "";
489 if (!normalizedPath) {
490 return "";
491 }
492
493 return stripTrailingSlashes(path.posix.normalize(normalizedPath));
494}
495
496function normalizeArchiveUntrackedPaths(paths: readonly string[]): string[] {
497 const normalizedPaths = paths.map((untrackedPath) => {

Callers 2

getProjectGitStatusesMethod · 0.85
executeBashMethod · 0.85

Calls 1

stripTrailingSlashesFunction · 0.90

Tested by

no test coverage detected