Skip to content

Commit

Permalink
Make helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichon-msft committed Sep 20, 2024
1 parent c8304bf commit f3aa6ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export async function phasedCommandHandler(options: IPhasedCommandHandlerOptions
const { logServePath } = options;
if (logServePath) {
for (const project of selectedProjects) {
const projectLogServePath: string = `${logServePath}/${project.packageName}`;
const projectLogServePath: string = getLogServePathForProject(logServePath, project.packageName);

routingRules.push({
type: 'folder',
Expand Down Expand Up @@ -309,7 +309,7 @@ function tryEnableBuildStatusWebSocketServer(
return;
}

const projectLogServePath: string = `${logServePath}/${packageName}`;
const projectLogServePath: string = getLogServePathForProject(logServePath, packageName);

const logFileUrls: ILogFileURLs = {
text: `${projectLogServePath}${logFilePaths.text.slice(logFilePaths.textFolder.length)}`,
Expand Down Expand Up @@ -487,3 +487,7 @@ function getRepositoryIdentifier(rushConfiguration: RushConfiguration): string {

return `${os.hostname()} - ${rushConfiguration.rushJsonFolder}`;
}

function getLogServePathForProject(logServePath: string, packageName: string) {
return `${logServePath}/${packageName}`;
}

0 comments on commit f3aa6ab

Please sign in to comment.