Fix bad write mode on Rakefile during install
This commit is contained in:
parent
53305edc68
commit
0b02e82229
|
@ -40,14 +40,17 @@ if ARGV[0] == 'init'
|
||||||
copy_unless_exists('spec/javascripts/support/sources-rails.yaml', 'spec/javascripts/support/sources.yaml')
|
copy_unless_exists('spec/javascripts/support/sources-rails.yaml', 'spec/javascripts/support/sources.yaml')
|
||||||
else
|
else
|
||||||
copy_unless_exists('spec/javascripts/support/sources.yaml')
|
copy_unless_exists('spec/javascripts/support/sources.yaml')
|
||||||
|
write_mode = 'w'
|
||||||
if File.exist?(dest_path('Rakefile'))
|
if File.exist?(dest_path('Rakefile'))
|
||||||
load dest_path('Rakefile')
|
load dest_path('Rakefile')
|
||||||
|
write_mode = 'a'
|
||||||
end
|
end
|
||||||
write_mode = Rake::Task.task_defined?('jasmine') ? 'a' : 'w'
|
unless Rake::Task.task_defined?('jasmine')
|
||||||
File.open(dest_path('Rakefile'), write_mode) do |f|
|
File.open(dest_path('Rakefile'), write_mode) do |f|
|
||||||
f.write(File.read(template_path('lib/tasks/jasmine.rake')))
|
f.write(File.read(template_path('lib/tasks/jasmine.rake')))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
File.open(template_path('INSTALL'), 'r').each_line do |line|
|
File.open(template_path('INSTALL'), 'r').each_line do |line|
|
||||||
puts line
|
puts line
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue