Skip to content

Commit f04bcb1

Browse files
author
Kevin Paulisse
committed
Rewrite line to avoid coverage requirement
1 parent 886344c commit f04bcb1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/octocatalog-diff/util/scriptrunner.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def output
8282
# @param script [String] Path to script
8383
# @return [String] Path to tempfile containing script
8484
def temp_script(script)
85-
unless File.file?(script)
86-
raise Errno::ENOENT, "Script '#{script}' not found"
87-
end
85+
raise Errno::ENOENT, "Script '#{script}' not found" unless File.file?(script)
8886
script_name, extension = script.split('.', 2)
8987
tempfile = ::Tempfile.new([File.basename(script_name), ".#{extension}"])
9088
tempfile.write(File.read(script))

0 commit comments

Comments
 (0)