mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 22:48:57 +02:00
fix(land-and-deploy,gen): auto-merge diagnosis + CRLF-stable generation
Two small hardenings: land-and-deploy Step 4 no longer misdiagnoses a failed `gh pr merge --auto` as a permissions problem when the real cause is the merge-method mismatch the command names; and gen-skill-docs normalizes CRLF at the template entry point so Windows checkouts with autocrlf produce byte-identical generated output to CI instead of silently skipping the \n-anchored transforms. Contributed by @Jmeg8r (PR #2437) and @1ncludeSteven (PR #1051). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
471d3b7a7d
commit
e5dda3b3e1
@@ -806,7 +806,12 @@ function processExternalHost(
|
||||
}
|
||||
|
||||
function processTemplate(tmplPath: string, host: Host = 'claude'): { outputPath: string; content: string; symlinkLoop?: boolean; catalogParts?: CatalogParts | null } {
|
||||
const tmplContent = fs.readFileSync(tmplPath, 'utf-8');
|
||||
// Normalize to LF at the entry point. Templates may have CRLF on disk when
|
||||
// checked out on Windows with core.autocrlf=true. Downstream regexes
|
||||
// (processVoiceTriggers, transformFrontmatter) hardcode \n, so without
|
||||
// normalization they silently no-op on CRLF — producing different output
|
||||
// than CI (Linux, LF) and breaking the Skill Docs Freshness check.
|
||||
const tmplContent = fs.readFileSync(tmplPath, 'utf-8').replace(/\r\n/g, '\n');
|
||||
const relTmplPath = path.relative(ROOT, tmplPath);
|
||||
let outputPath = tmplPath.replace(/\.tmpl$/, '');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user