Fix that theme will not be overwritten if exists.
When some theme exists, "rake theme:install" will not overwrite the previous theme files, even if we answer "y" to the "Do you want to overwrite?" question. This commit fixes this.
This commit is contained in:
parent
9c0026973b
commit
5af2512438
1 changed files with 2 additions and 2 deletions
4
Rakefile
4
Rakefile
|
@ -197,8 +197,8 @@ namespace :theme do
|
|||
# Mirror each file into the framework making sure to prompt if already exists.
|
||||
packaged_theme_files.each do |filename|
|
||||
file_install_path = File.join(JB::Path.base, filename)
|
||||
if File.exist? file_install_path
|
||||
next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
next
|
||||
else
|
||||
mkdir_p File.dirname(file_install_path)
|
||||
cp_r File.join(packaged_theme_path, filename), file_install_path
|
||||
|
|
Loading…
Add table
Reference in a new issue