Commit c4ce20c
committed
fix bugs in stdio MCP client
Bug 1 — CWD mismatch in stdio mode (both platforms):
StdioClientTransport inherited the client/ working directory, so
relative paths passed to CodeQL CLI (e.g. server/ql/javascript/...)
resolved to client/server/ql/... which does not exist. Add cwd: repoRoot
to the transport options to match the HTTP-mode behavior where
start-server.sh explicitly cd's to the repo root.
Bug 2 — False success on Windows in stdio mode:
StdioClientTransport.close() could cause an abrupt process exit on
Windows before printTestSummary() and process.exit(exitCode) were
reached, so the shell script saw exit code 0 and reported success
despite test failures. Move summary printing and process.exitCode
assignment above the disconnect() call in all four run methods so
results are always reported even if disconnect triggers an early exit.1 parent 87e5248 commit c4ce20c
File tree
2 files changed
+60
-30
lines changed- client
- integration-tests/primitives/tools/codeql_bqrs_interpret/sarif_format/after
- src
2 files changed
+60
-30
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 220 | | |
223 | 221 | | |
224 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
226 | 236 | | |
227 | | - | |
228 | | - | |
| 237 | + | |
229 | 238 | | |
230 | 239 | | |
231 | 240 | | |
| |||
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 258 | | |
254 | 259 | | |
255 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
257 | 274 | | |
258 | | - | |
259 | | - | |
| 275 | + | |
260 | 276 | | |
261 | 277 | | |
262 | 278 | | |
| |||
350 | 366 | | |
351 | 367 | | |
352 | 368 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 369 | | |
358 | 370 | | |
359 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
360 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
361 | 385 | | |
362 | | - | |
363 | | - | |
| 386 | + | |
364 | 387 | | |
365 | 388 | | |
366 | 389 | | |
| |||
387 | 410 | | |
388 | 411 | | |
389 | 412 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | 413 | | |
395 | 414 | | |
396 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
397 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
398 | 429 | | |
399 | | - | |
400 | | - | |
| 430 | + | |
401 | 431 | | |
402 | 432 | | |
403 | 433 | | |
| |||
0 commit comments