fix unclosed identifier bug. #119
This commit is contained in:
parent
8ef9e26109
commit
96fc6eb4dc
@ -1,3 +1,8 @@
|
|||||||
|
### 0.6.6 / March 8th, 2011
|
||||||
|
|
||||||
|
* Fix unclosed identifier bug. #119 [Javan Makhmali]
|
||||||
|
|
||||||
|
|
||||||
### 0.6.5 / March 8th, 2011
|
### 0.6.5 / March 8th, 2011
|
||||||
|
|
||||||
* Preserve whitespace at the end of crontab file. #95 [Rich Meyers]
|
* Preserve whitespace at the end of crontab file. #95 [Rich Meyers]
|
||||||
|
@ -89,10 +89,10 @@ module Whenever
|
|||||||
|
|
||||||
def updated_crontab
|
def updated_crontab
|
||||||
# Check for unopened or unclosed identifier blocks
|
# Check for unopened or unclosed identifier blocks
|
||||||
if read_crontab =~ Regexp.new("^#{comment_open}$") && (read_crontab =~ Regexp.new("^#{comment_close}$")).nil?
|
if read_crontab =~ Regexp.new("^#{comment_open}$") && (read_crontab =~ Regexp.new("^#{comment_close}")).nil?
|
||||||
warn "[fail] Unclosed indentifier; Your crontab file contains '#{comment_open}', but no '#{comment_close}'"
|
warn "[fail] Unclosed indentifier; Your crontab file contains '#{comment_open}', but no '#{comment_close}'"
|
||||||
exit(1)
|
exit(1)
|
||||||
elsif (read_crontab =~ Regexp.new("^#{comment_open}$")).nil? && read_crontab =~ Regexp.new("^#{comment_close}$")
|
elsif (read_crontab =~ Regexp.new("^#{comment_open}$")).nil? && read_crontab =~ Regexp.new("^#{comment_close}")
|
||||||
warn "[fail] Unopened indentifier; Your crontab file contains '#{comment_close}', but no '#{comment_open}'"
|
warn "[fail] Unopened indentifier; Your crontab file contains '#{comment_close}', but no '#{comment_open}'"
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Whenever
|
module Whenever
|
||||||
VERSION = '0.6.5'
|
VERSION = '0.6.6'
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user