@@ -6,6 +6,7 @@ import * as path from 'node:path';
66import {
77 FileSystem ,
88 JsonFile ,
9+ NewlineKind ,
910 PosixModeBits ,
1011 type JsonObject ,
1112 type JsonSchema
@@ -68,9 +69,11 @@ export class AutoinstallerPluginLoader extends PluginLoaderBase<IRushPluginConfi
6869 ) ;
6970
7071 const destinationManifestPath : string = this . _getManifestPath ( ) ;
71- FileSystem . copyFile ( {
72- sourcePath : manifestPath ,
73- destinationPath : destinationManifestPath
72+
73+ // Use read+write instead of copy to ensure line endings are normalized
74+ const manifestContent : string = FileSystem . readFile ( manifestPath ) ;
75+ FileSystem . writeFile ( destinationManifestPath , manifestContent , {
76+ convertLineEndings : NewlineKind . Lf
7477 } ) ;
7578 // Make permission consistent since it will be committed to Git
7679 FileSystem . changePosixModeBits (
@@ -98,9 +101,11 @@ export class AutoinstallerPluginLoader extends PluginLoaderBase<IRushPluginConfi
98101 ) ;
99102 }
100103 const destinationCommandLineJsonFilePath : string = this . _getCommandLineJsonFilePath ( ) ;
101- FileSystem . copyFile ( {
102- sourcePath : commandLineJsonFullFilePath ,
103- destinationPath : destinationCommandLineJsonFilePath
104+
105+ // Use read+write instead of copy to ensure line endings are normalized
106+ const commandLineContent : string = FileSystem . readFile ( commandLineJsonFullFilePath ) ;
107+ FileSystem . writeFile ( destinationCommandLineJsonFilePath , commandLineContent , {
108+ convertLineEndings : NewlineKind . Lf
104109 } ) ;
105110 // Make permission consistent since it will be committed to Git
106111 FileSystem . changePosixModeBits (
0 commit comments