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

@@ -181,14 +181,14 @@ module YouPlot
warn " Headers: \e[35m#{data.headers.inspect}\e[0m"
warn " The first item is: \e[35m\"#{series[0][0]}\"\e[0m"
warn " The last item is : \e[35m\"#{series[0][-1]}\"\e[0m"
exit 1
exit 1 if YouPlot.run_as_executable?
end
if fmt == 'xyxy' && series.size.odd?
warn 'YouPlot: In the xyxy format, the number of series must be even.'
warn ''
warn " Number of series: \e[35m#{series.size}\e[0m"
warn " Headers: \e[35m#{data.headers.inspect}\e[0m"
exit 1
exit 1 if YouPlot.run_as_executable?
end
end
end