From b411206fc49a019adf76f2773591d43ac956f935 Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:19:22 -0500 Subject: [PATCH 1/2] windows --- jest/private/jest_test.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest/private/jest_test.bzl b/jest/private/jest_test.bzl index 76c891f..b1a858d 100644 --- a/jest/private/jest_test.bzl +++ b/jest/private/jest_test.bzl @@ -102,7 +102,7 @@ def _impl(ctx): "--config", # quote the path since it might have special chars such as parens. # quoting ensures that the shell doesn't do any globbing or splitting. - "'" + paths.join(unwind_chdir_prefix, generated_config.short_path) + "'", + '"' + paths.join(unwind_chdir_prefix, generated_config.short_path) + '"', ]) if ctx.attr.log_level == "debug": fixed_args.append("--debug") From 0d030bbe7234776746aa64ec39905ff6eb93d52b Mon Sep 17 00:00:00 2001 From: Chris Brown <77508021+peakschris@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:33:10 -0500 Subject: [PATCH 2/2] windows --- jest/private/jest_test.bzl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jest/private/jest_test.bzl b/jest/private/jest_test.bzl index b1a858d..9075f6a 100644 --- a/jest/private/jest_test.bzl +++ b/jest/private/jest_test.bzl @@ -48,6 +48,11 @@ _attrs = dicts.add(js_binary_lib.attrs, { ), }) +def _quote(ctx, str): + # Use double quotes on Windows hosts, single quotes elsewhere + quote_char = '"' if ctx.configuration.host_path_separator == ";" else "'" + return quote_char + str + quote_char + def _impl(ctx): providers = [] generated_config = ctx.actions.declare_file("%s__jest.config.mjs" % ctx.label.name) @@ -102,7 +107,7 @@ def _impl(ctx): "--config", # quote the path since it might have special chars such as parens. # quoting ensures that the shell doesn't do any globbing or splitting. - '"' + paths.join(unwind_chdir_prefix, generated_config.short_path) + '"', + _quote(ctx, paths.join(unwind_chdir_prefix, generated_config.short_path)), ]) if ctx.attr.log_level == "debug": fixed_args.append("--debug")