Skip to content

Commit

Permalink
Raise error early if no script is specified by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokaro committed Jul 27, 2024
1 parent 6bc650c commit 8809c07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/ocran/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,9 @@ def parse(argv)
end
end

@options[:script] = source_files.first
raise "No script file specified" if source_files.empty?

if script.nil?
raise "No script file specified"
end
@options[:script] = source_files.first

@options[:force_autoload?] = run_script? && load_autoload?

Expand Down

0 comments on commit 8809c07

Please sign in to comment.