Minor refactoring

This commit is contained in:
kojix2 2023-01-05 12:05:11 +09:00
parent f8bd152a63
commit 27a84a4df1

View File

@ -30,11 +30,15 @@ module YouPlot
@params = Parameters.new
if find_config_file
apply_config_file
end
def apply_config_file
return unless find_config_file
read_config_file
configure
end
end
def config_file_candidate_paths
# keep the order of the paths
@ -338,12 +342,11 @@ module YouPlot
else
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
else
raise Error, error_message
end
end
end