Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "Fix autoinstaller plugin loader behavior.",
"type": "none",
"packageName": "@microsoft/rush"
}
],
"packageName": "@microsoft/rush",
"email": "61671317+kevin-y-ang@users.noreply.github.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as path from 'node:path';
import {
FileSystem,
JsonFile,
NewlineKind,
PosixModeBits,
type JsonObject,
type JsonSchema
Expand Down Expand Up @@ -68,9 +69,11 @@ export class AutoinstallerPluginLoader extends PluginLoaderBase<IRushPluginConfi
);

const destinationManifestPath: string = this._getManifestPath();
FileSystem.copyFile({
sourcePath: manifestPath,
destinationPath: destinationManifestPath

// Use read+write instead of copy to ensure line endings are normalized
const manifestContent: string = FileSystem.readFile(manifestPath);
FileSystem.writeFile(destinationManifestPath, manifestContent, {
convertLineEndings: NewlineKind.Lf
});
// Make permission consistent since it will be committed to Git
FileSystem.changePosixModeBits(
Expand Down Expand Up @@ -98,9 +101,11 @@ export class AutoinstallerPluginLoader extends PluginLoaderBase<IRushPluginConfi
);
}
const destinationCommandLineJsonFilePath: string = this._getCommandLineJsonFilePath();
FileSystem.copyFile({
sourcePath: commandLineJsonFullFilePath,
destinationPath: destinationCommandLineJsonFilePath

// Use read+write instead of copy to ensure line endings are normalized
const commandLineContent: string = FileSystem.readFile(commandLineJsonFullFilePath);
FileSystem.writeFile(destinationCommandLineJsonFilePath, commandLineContent, {
convertLineEndings: NewlineKind.Lf
});
// Make permission consistent since it will be committed to Git
FileSystem.changePosixModeBits(
Expand Down