mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
fix: ensure POSIX-compliant newlines in generated files (#856)
- Add final newline check to YAML config generation - Add final newline check to YAML manifest generation - Add final newline check to agent .md file generation - Ensures all text files end with \n per POSIX standard - Fixes 'No newline at end of file' git warnings
This commit is contained in:
@@ -35,7 +35,9 @@ class Manifest {
|
||||
sortKeys: false,
|
||||
});
|
||||
|
||||
await fs.writeFile(manifestPath, yamlContent, 'utf8');
|
||||
// Ensure POSIX-compliant final newline
|
||||
const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
|
||||
await fs.writeFile(manifestPath, content, 'utf8');
|
||||
return { success: true, path: manifestPath, filesTracked: 0 };
|
||||
}
|
||||
|
||||
@@ -104,7 +106,9 @@ class Manifest {
|
||||
sortKeys: false,
|
||||
});
|
||||
|
||||
await fs.writeFile(manifestPath, yamlContent, 'utf8');
|
||||
// Ensure POSIX-compliant final newline
|
||||
const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
|
||||
await fs.writeFile(manifestPath, content, 'utf8');
|
||||
|
||||
return manifest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user