We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16dd919 commit 88c24e0Copy full SHA for 88c24e0
1 file changed
src/cli.cppm
@@ -3162,8 +3162,12 @@ int cmd_test(const mcpplibs::cmdline::ParsedArgs& /*parsed*/,
3162
std::string cmd = std::format("{}'{}'", pathPrefix, exe.string());
3163
for (auto& a : passthrough) cmd += std::format(" '{}'", a);
3164
int rc = std::system(cmd.c_str());
3165
- // std::system returns wait status — extract exit code.
+ // std::system returns wait status on POSIX, exit code on Windows.
3166
+#if defined(_WIN32)
3167
+ int exitCode = rc;
3168
+#else
3169
int exitCode = WIFEXITED(rc) ? WEXITSTATUS(rc) : 127;
3170
+#endif
3171
3172
if (exitCode == 0) {
3173
std::println("{} ... ok", lu.targetName);
0 commit comments