File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747#include < fcntl.h>
4848#endif
4949
50+ #ifdef _WIN32
51+ #define VIX_TESTS_POPEN _popen
52+ #define VIX_TESTS_PCLOSE _pclose
53+ #else
54+ #define VIX_TESTS_POPEN popen
55+ #define VIX_TESTS_PCLOSE pclose
56+ #endif
57+
5058using namespace vix ::cli::style;
5159namespace fs = std::filesystem;
5260namespace build = vix::cli::build;
@@ -592,7 +600,7 @@ namespace
592600
593601 const std::string cmd = shell_join (argv) + " 2>&1" ;
594602
595- FILE *pipe = popen (cmd.c_str (), " r" );
603+ FILE *pipe = VIX_TESTS_POPEN (cmd.c_str (), " r" );
596604 if (!pipe)
597605 {
598606 result.code = 127 ;
@@ -605,7 +613,7 @@ namespace
605613 while (fgets (buffer, sizeof (buffer), pipe) != nullptr )
606614 result.output += buffer;
607615
608- const int raw = pclose (pipe);
616+ const int raw = VIX_TESTS_PCLOSE (pipe);
609617 result.code = vix::cli::process::normalize_exit_code (raw);
610618
611619 return result;
You can’t perform that action at this time.
0 commit comments