File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
dart_mcp_server/lib/src/utils Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
- The old ` reject ` enum value was replaced with a static constant equal
9
9
exactly to ` decline ` , so switches are not affected.
10
10
- Add ` title ` parameter to ` Prompt ` constructor.
11
+ - Only execute sub-processes in a shell if they are ` .bat ` files.
11
12
12
13
## 0.3.2
13
14
Original file line number Diff line number Diff line change 3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
5
import 'dart:async' ;
6
+ import 'dart:io' as io;
6
7
7
8
import 'package:collection/collection.dart' ;
8
9
import 'package:dart_mcp/server.dart' ;
@@ -224,7 +225,10 @@ Future<CallToolResult> runCommandInRoot(
224
225
final result = await processManager.run (
225
226
commandWithPaths,
226
227
workingDirectory: workingDir.path,
227
- runInShell: true ,
228
+ runInShell:
229
+ // Required when running .bat files on windows, but otherwise should
230
+ // be avoided due to escaping behavior.
231
+ io.Platform .isWindows && commandWithPaths.first.endsWith ('.bat' ),
228
232
);
229
233
230
234
final output = (result.stdout as String ).trim ();
You can’t perform that action at this time.
0 commit comments