Skip to content

Commit

Permalink
Merge pull request #104 from nevinera/nev-103--fix-nil-command-problem
Browse files Browse the repository at this point in the history
Log nil commands correctly (skipped runners)
  • Loading branch information
nevinera authored Jun 14, 2023
2 parents eb85ade + 23e7a5a commit b36b44f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Release 1.3.1

* Fix a bug around the logging of nil commands when runners are skipped (#104
resolves #103)

## Release 1.3.0

* Support (and enable by default) colorizing the console stderr output from
Expand Down
3 changes: 2 additions & 1 deletion lib/quiet_quality/executors/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def runner
end

def log_runner(r)
info("Runner #{r.tool_name} command: `#{r.command.join(" ")}`")
command_string = r.command ? "`#{r.command.join(" ")}`" : "(skipped)"
info("Runner #{r.tool_name} command: #{command_string}")
debug("Full command for #{r.tool_name}", data: r.command)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/quiet_quality/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module QuietQuality
VERSION = "1.3.0"
VERSION = "1.3.1"
end
10 changes: 10 additions & 0 deletions spec/quiet_quality/executors/pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@
end
end

context "when the runner is skipping" do
before { allow(runner).to receive(:command).and_return(nil) }

it "logs the empty command" do
outcome
expect_info("Runner rspec command: (skipped)")
expect_debug("Full command for rspec", data: nil)
end
end

shared_examples "it matches the runner outcome, failure status aside" do
it "matches the runner outcome, aside from the failure status" do
expect(outcome.output).to eq(runner_outcome.output)
Expand Down

0 comments on commit b36b44f

Please sign in to comment.