Windows: Refactor Shell Scripts to Node.js for Cross-Platform Compatibility (#784)

This commit is contained in:
matt korwel
2025-06-09 12:19:42 -07:00
committed by GitHub
parent 2182a1cd2c
commit 3b943c1582
38 changed files with 1723 additions and 853 deletions

View File

@@ -206,6 +206,8 @@ Expectation for required parameters:
try {
currentContent = fs.readFileSync(params.file_path, 'utf8');
// Normalize line endings to LF for consistent processing.
currentContent = currentContent.replace(/\r\n/g, '\n');
fileExists = true;
} catch (err: unknown) {
if (!isNodeError(err) || err.code !== 'ENOENT') {
@@ -303,6 +305,8 @@ Expectation for required parameters:
try {
currentContent = fs.readFileSync(params.file_path, 'utf8');
// Normalize line endings to LF for consistent processing.
currentContent = currentContent.replace(/\r\n/g, '\n');
fileExists = true;
} catch (err: unknown) {
if (isNodeError(err) && err.code === 'ENOENT') {