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 88 - The old ` reject ` enum value was replaced with a static constant equal
99 exactly to ` decline ` , so switches are not affected.
1010- Add ` title ` parameter to ` Prompt ` constructor.
11+ - Only execute sub-processes in a shell if they are ` .bat ` files.
1112
1213## 0.3.2
1314
Original file line number Diff line number Diff line change 33// BSD-style license that can be found in the LICENSE file.
44
55import 'dart:async' ;
6+ import 'dart:io' as io;
67
78import 'package:collection/collection.dart' ;
89import 'package:dart_mcp/server.dart' ;
@@ -224,7 +225,10 @@ Future<CallToolResult> runCommandInRoot(
224225 final result = await processManager.run (
225226 commandWithPaths,
226227 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' ),
228232 );
229233
230234 final output = (result.stdout as String ).trim ();
You can’t perform that action at this time.
0 commit comments