Skip to content

Commit a403ec1

Browse files
darsi-aniclanton
andauthored
Update install-run.ts copyAndTrim comment and add verbose comment to Utilities npmrc delete and copy log messages
Co-Authored-By: Ian Clanton-Thuon <iclanton@users.noreply.github.com>
1 parent cfed12b commit a403ec1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/rush-lib/src/scripts/install-run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function _copyAndTrimNpmrcFile(sourceNpmrcPath: string, targetNpmrcPath: string)
102102
* syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file.
103103
* If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder.
104104
*
105-
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH _syncNpmrc() FROM scripts/install-run.ts
105+
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc()
106106
*/
107107
function _syncNpmrc(sourceNpmrcFolder: string, targetNpmrcFolder: string, useNpmrcPublish?: boolean): void {
108108
const sourceNpmrcPath: string = path.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish');

apps/rush-lib/src/utilities/Utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export class Utilities {
515515
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH _copyNpmrcFile() FROM scripts/install-run.ts
516516
*/
517517
public static copyAndTrimNpmrcFile(sourceNpmrcPath: string, targetNpmrcPath: string): void {
518-
console.log(`Copying ${sourceNpmrcPath} --> ${targetNpmrcPath}`);
518+
console.log(`Copying ${sourceNpmrcPath} --> ${targetNpmrcPath}`); // Verbose
519519
let npmrcFileLines: string[] = FileSystem.readFile(sourceNpmrcPath).split('\n');
520520
npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim());
521521
const resultLines: string[] = [];
@@ -562,7 +562,7 @@ export class Utilities {
562562
Utilities.copyAndTrimNpmrcFile(sourceNpmrcPath, targetNpmrcPath);
563563
} else if (FileSystem.exists(targetNpmrcPath)) {
564564
// If the source .npmrc doesn't exist and there is one in the target, delete the one in the target
565-
console.log(`Deleting ${targetNpmrcPath}`);
565+
console.log(`Deleting ${targetNpmrcPath}`); // Verbose
566566
FileSystem.deleteFile(targetNpmrcPath);
567567
}
568568
} catch (e) {

0 commit comments

Comments
 (0)