From 64a49051a46d986b4d3b1f279eaef3d141e20d5a Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 8 Apr 2026 10:47:34 -0400 Subject: ZJIT: Detect bad configuration in make command in bisect script --- tool/zjit_bisect.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool/zjit_bisect.rb b/tool/zjit_bisect.rb index 38235561ec..798b98b1f7 100755 --- a/tool/zjit_bisect.rb +++ b/tool/zjit_bisect.rb @@ -82,6 +82,9 @@ def add_zjit_options cmd zjit_opts = cmd.select { |arg| arg.start_with?("--zjit") } run_opts_index = cmd.find_index { |arg| arg.start_with?("RUN_OPTS=") } specopts_index = cmd.find_index { |arg| arg.start_with?("SPECOPTS=") } + if run_opts_index && specopts_index + raise "Expected only one of RUN_OPTS or SPECOPTS to be present in make command, but both were found" + end if run_opts_index run_opts = Shellwords.split(cmd[run_opts_index].delete_prefix("RUN_OPTS=")) run_opts.concat(zjit_opts) -- cgit v1.2.3