diff --git a/toolchains/workspace-pnpm/run_npm_test.py b/toolchains/workspace-pnpm/run_npm_test.py index df553605ea..1c7714db0d 100644 --- a/toolchains/workspace-pnpm/run_npm_test.py +++ b/toolchains/workspace-pnpm/run_npm_test.py @@ -50,10 +50,14 @@ def merge_env_from_file(file_path): ) args = parser.parse_args() + + env = merge_env_from_file(args.env_file) + bin_args = args.args[1:] # ignore '--' separator + if env.get("TEST"): + bin_args.append(env.get("TEST")) cmd = [os.path.abspath(args.bin), *bin_args] - env = merge_env_from_file(args.env_file) exit_code = subprocess.call(cmd, cwd=args.cwd, env=env) sys.exit(exit_code)