mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Minor refactoring
This commit is contained in:
parent
f8bd152a63
commit
27a84a4df1
@ -30,10 +30,14 @@ module YouPlot
|
||||
|
||||
@params = Parameters.new
|
||||
|
||||
if find_config_file
|
||||
read_config_file
|
||||
configure
|
||||
end
|
||||
apply_config_file
|
||||
end
|
||||
|
||||
def apply_config_file
|
||||
return unless find_config_file
|
||||
|
||||
read_config_file
|
||||
configure
|
||||
end
|
||||
|
||||
def config_file_candidate_paths
|
||||
@ -338,12 +342,11 @@ module YouPlot
|
||||
|
||||
else
|
||||
error_message = "uplot: unrecognized command '#{command}'"
|
||||
if YouPlot.run_as_executable?
|
||||
warn error_message
|
||||
exit 1
|
||||
else
|
||||
raise Error, error_message
|
||||
end
|
||||
raise Error, error_message unless YouPlot.run_as_executable?
|
||||
|
||||
warn error_message
|
||||
exit 1
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user