mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Allow Discourse::Utils.execute_command
timeout with env
(#12672)
Followup to 5deda5ef3ef8763dfe936a313e0dddaa279a1b04 The first argument to `Open3.capture3` can be an environment variable hash. In this case, we need to insert the `timeout` command after the env hash.
This commit is contained in:
@ -402,6 +402,10 @@ describe Discourse do
|
||||
expect do
|
||||
Discourse::Utils.execute_command("sleep", "999999999999", timeout: 0.001)
|
||||
end.to raise_error(RuntimeError)
|
||||
|
||||
expect do
|
||||
Discourse::Utils.execute_command({ "MYENV" => "MYVAL" }, "sleep", "999999999999", timeout: 0.001)
|
||||
end.to raise_error(RuntimeError)
|
||||
end
|
||||
|
||||
it "works with a block" do
|
||||
|
Reference in New Issue
Block a user