Skip to content

Commit

Permalink
mina init overrides config/deploy.rb
Browse files Browse the repository at this point in the history
Fixes #634
  • Loading branch information
d4be4st authored Sep 18, 2019
2 parents 31ea923 + 0ea9e68 commit 84fa84c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tasks/mina/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
end

outfile = './config/deploy.rb'

if File.exists?(outfile)
print 'deploy.rb already exists, do you want to overwrite it? (y/n) '

exit(8) if $stdin.readline.chomp.downcase != 'y'
end

require 'fileutils'
FileUtils.mkdir_p './config'
FileUtils.cp Mina.root_path('data/deploy.rb'), outfile
Expand Down

0 comments on commit 84fa84c

Please sign in to comment.