DEV: Suppress verbose command failure output in plugin:turbo_spec (#25952)

Before this change, if the "Plugins backend" task on GitHub CI
failed, we would get a huge amount of extra output at the end
just to show the command that rake ran which failed (the bin/turbo_rspec
command). This is useless and just makes it hard to see the failing
specs. If you need the full command, it's already output at the
top of the "Plugins backend" task in the GitHub CI.
This commit is contained in:
Martin Brennan 2024-02-29 14:35:31 +10:00 committed by GitHub
parent f562da3150
commit 5f119c57e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,7 +199,9 @@ def spec(plugin, parallel: false, argv: nil)
cmd = parallel ? "bin/turbo_rspec" : "bin/rspec"
Rake::FileUtilsExt.verbose(!parallel) do
sh("LOAD_PLUGINS=1 #{cmd} #{files.join(" ")} #{params.join(" ")}")
sh("LOAD_PLUGINS=1 #{cmd} #{files.join(" ")} #{params.join(" ")}") do |ok, status|
fail "Spec command failed with status (#{status.exitstatus})" if !ok
end
end
else
abort "No specs found."