Do not exit when using as a library

This commit is contained in:
kojix2
2021-01-20 00:07:23 +09:00
parent 62cc6ba364
commit 8db1306e07
7 changed files with 19 additions and 8 deletions

View File

@@ -25,10 +25,10 @@ module YouPlot
Data.new(headers, series)
elsif h_size > s_size
warn "\e[35mThe number of headers is greater than the number of series.\e[0m"
exit 1
exit 1 if YouPlot.run_as_executable?
elsif h_size < s_size
warn "\e[35mThe number of headers is less than the number of series.\e[0m"
exit 1
exit 1 if YouPlot.run_as_executable?
end
end
end