MCPcopy Create free account
hub / github.com/TanStack/router / captureCommandOutput

Function captureCommandOutput

scripts/nx/playwright-plugin.ts:114–128  ·  view source on GitHub ↗
(command: string, outputFile?: string)

Source from the content-addressed store, hash-verified

112}
113
114function captureCommandOutput(command: string, outputFile?: string): string {
115 if (!outputFile) {
116 return command
117 }
118
119 if (!/^[a-zA-Z0-9._-]+$/.test(outputFile)) {
120 throw new Error(
121 `[Playwright Sharding Plugin] Invalid E2E_BUILD_LOG value: ${outputFile}. ` +
122 `Expected a filename containing only letters, numbers, dots, dashes, and underscores.`,
123 )
124 }
125
126 const escapedCommand = command.replaceAll("'", "'\\''")
127 return `bash -o pipefail -c '{ ${escapedCommand}; } 2>&1 | tee ${outputFile}'`
128}
129
130function getTestOutputs(
131 modeKey: string,

Callers 1

buildModeTargetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected