Skip to content

Commit 5af2512

Browse files
committed
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.
1 parent 9c00269 commit 5af2512

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ namespace :theme do
197197
# Mirror each file into the framework making sure to prompt if already exists.
198198
packaged_theme_files.each do |filename|
199199
file_install_path = File.join(JB::Path.base, filename)
200-
if File.exist? file_install_path
201-
next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
200+
if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
201+
next
202202
else
203203
mkdir_p File.dirname(file_install_path)
204204
cp_r File.join(packaged_theme_path, filename), file_install_path

0 commit comments

Comments
 (0)