Fix template literal syntax error in sed command

The dollar-brace in sed end-of-file pattern was interpreted as
TypeScript template literal interpolation. Use escaped syntax
to insert a literal dollar sign.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shang Chieh Tseng
2025-12-17 20:07:15 +08:00
parent 6c97e5cd61
commit 6383a2e036

View File

@@ -219,7 +219,8 @@ export class LogCollector {
sedCmd = `sed -n '/===MARKER:START:${escapedTestId}:/,/===MARKER:END:${escapedTestId}:/{/===MARKER:/d;p}' "${this.sessionFile}"`;
} else {
// Extract from START to EOF (test still running, no END marker yet)
sedCmd = `sed -n '/===MARKER:START:${escapedTestId}:/,\\${/===MARKER:/d;p}' "${this.sessionFile}"`;
// Note: Use ${'$'} to insert literal $ in template literal (avoids ${} interpolation)
sedCmd = `sed -n '/===MARKER:START:${escapedTestId}:/,${'$'}{/===MARKER:/d;p}' "${this.sessionFile}"`;
}
const result = execSync(sedCmd, {