From ea214d959113c60523b545a8520f99fa3713207c Mon Sep 17 00:00:00 2001 From: ZhuchkaTriplesix Date: Sun, 11 Oct 2026 18:52:34 +0300 Subject: [PATCH] fix(ext-tester): set the process exit code, main's return value is ignored querya-ext-tester declared Future main and returned 0 / 1 / 2, but Dart ignores the return value of main: every run exited 0, so CI could not fail on a broken extension and the release smoke test (an empty directory must exit 1) failed. The code is now assigned to exitCode. --- bin/querya_ext_tester.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/querya_ext_tester.dart b/bin/querya_ext_tester.dart index 95681fbd..4417754f 100644 --- a/bin/querya_ext_tester.dart +++ b/bin/querya_ext_tester.dart @@ -31,7 +31,13 @@ Options: -h, --help show this help '''; -Future main(List args) async { +/// The exit code is set through `exitCode`: a Dart `main` cannot return one +/// (the `Future` it used to return was ignored, so a failed run exited 0). +Future main(List args) async { + exitCode = await _run(args); +} + +Future _run(List args) async { String? dir; var target = '0.5.0'; String? connect;