File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
mcp/mcp-cli-api/src/main/java/software/amazon/smithy/java/mcp/cli Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -452,15 +452,16 @@ private static boolean tryAddToShellConfigs(String shimsDirStr) {
452
452
453
453
if (!alreadyPresent ) {
454
454
// Add the export statement
455
- lines .add ("" );
456
- lines .add (comment );
457
- lines .add (pathExport );
455
+ var newLines = new ArrayList <String >();
456
+ newLines .add ("" );
457
+ newLines .add (comment );
458
+ newLines .add (pathExport );
458
459
459
460
Files .write (configPath ,
460
- lines ,
461
+ newLines ,
461
462
StandardCharsets .UTF_8 ,
462
463
StandardOpenOption .WRITE ,
463
- StandardOpenOption .TRUNCATE_EXISTING );
464
+ StandardOpenOption .APPEND );
464
465
465
466
System .out .println ("Added mcp-servers directory to PATH in " + configFile );
466
467
System .out .println (
You can’t perform that action at this time.
0 commit comments