features: write EXIT STATUS to output so it all prints when we get an exit status we aren't expecting
This commit is contained in:
parent
7d81c00b29
commit
dd15e3c368
|
@ -228,8 +228,13 @@ end
|
|||
#
|
||||
|
||||
Then %r{^I should see "(.*)" in the build output$} do |text|
|
||||
regexp = Regexp.new(text)
|
||||
expect(jekyll_run_output).to match regexp
|
||||
expect(jekyll_run_output).to match Regexp.new(text)
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
Then %r{^I should get a zero exit(?:\-| )status$} do
|
||||
step %(I should see "EXIT STATUS: 0" in the build output)
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -100,8 +100,13 @@ def run_in_shell(*args)
|
|||
end
|
||||
|
||||
File.write(Paths.status_file, p.value.exitstatus)
|
||||
File.write(Paths.output_file, out) if p.value.exitstatus == 0
|
||||
File.write(Paths.output_file, err) if p.value.exitstatus != 0
|
||||
File.open(Paths.output_file, "wb") do |f|
|
||||
f.puts args.join(" ")
|
||||
f.puts out
|
||||
f.puts err
|
||||
f.puts "EXIT STATUS: #{p.value.exitstatus}"
|
||||
end
|
||||
|
||||
p.value
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue