From 8b003d08f306bcd457ced0f15639e1faa4e10859 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 1 Jan 2025 20:12:12 -0800 Subject: [PATCH] Patching mwrap for debugging CI failures --- Makefile | 2 +- tools/cw/mwrap.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f79e23cd35..68247bece4 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ $(VENV_ACTIVATE): . $(VENV_ACTIVATE) ; pip install -r requirements.txt $(BUILD)/build.ninja: $(ROOT_INI) $(DOT_MWCONFIG) $(VENV_ACTIVATE) | $(BUILD) - MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(VENV_MESON) setup \ + . $(VENV_ACTIVATE) ; MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(MESON) setup \ --wrap-mode=nopromote \ --native-file=meson/$(NATIVE) \ --native-file=$(ROOT_INI) \ diff --git a/tools/cw/mwrap.c b/tools/cw/mwrap.c index 9034d91e2a..250df08f57 100644 --- a/tools/cw/mwrap.c +++ b/tools/cw/mwrap.c @@ -528,6 +528,8 @@ int _tmain(int argc, _TCHAR *argv[]) // Add the wine command if requested _TCHAR *wine = utftotc(cfg.wine); + printf("cfg.wine: %s\n", cfg.wine); + printf("wine: %s\n", wine); if (wine) { new_argc += 1; new_argv = realloc(new_argv, sizeof(*new_argv) * (new_argc + 1)); @@ -612,6 +614,11 @@ int _tmain(int argc, _TCHAR *argv[]) printf("\n"); } pid_t pid; + printf("new argv:"); + for (size_t i = 0; i < new_argc; i++) { + printf(" %s", new_argv[i]); + } + printf("\n"); if (posix_spawn(&pid, new_argv[0], NULL, NULL, new_argv, environ) != 0) { perror(PROGRAM_NAME ": posix_spawn"); exit(EXIT_FAILURE);