Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 951b841

Browse files
not worth it
1 parent 186fe94 commit 951b841

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

config/initializers/wiki.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88

99
if repo_url.present?
1010
upstream = 'origin'
11-
if File.exist?(File.join(local_dir, '.git'))
12-
output = `cd #{local_dir} && git pull #{upstream} master 2>&1`
13-
if $?.success?
14-
Rails.logger.info "Pulled #{repo_url} to #{local_dir}: #{output}"
15-
else
16-
Rails.logger.error "Unable to pull #{repo_url} to #{local_dir}: #{output}"
17-
end
18-
else
11+
# if File.exist?(File.join(local_dir, '.git'))
12+
# output = `cd #{local_dir} && git pull #{upstream} master 2>&1`
13+
# if $?.success?
14+
# Rails.logger.info "Pulled #{repo_url} to #{local_dir}: #{output}"
15+
# else
16+
# Rails.logger.error "Unable to pull #{repo_url} to #{local_dir}: #{output}"
17+
# end
18+
# else
1919
output = `git clone #{repo_url} #{local_dir} 2>&1`
2020
if $?.success?
2121
Rails.logger.info "Cloned #{repo_url} to #{local_dir}: #{output}"
2222
else
2323
Rails.logger.error "Unable to clone #{repo_url} to #{local_dir}: #{output}"
2424
end
2525
# puts "Cloned wiki repo: #{output}"
26-
end
26+
# end
2727
else
2828
Rails.logger.warn "Initializing #{local_dir} for local use [WITH NO UPSTREAM BACKUP]"
2929
system "git init #{local_dir}"

0 commit comments

Comments
 (0)