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

Function captureCommandOutput

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

Source from the content-addressed store, hash-verified

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

Callers 1

buildModeTargetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected