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