mirror of
https://github.com/haml/haml-rails.git
synced 2022-11-09 12:34:15 -05:00
Check the result of external html2haml
command and output a proper message
This commit is contained in:
parent
8bbe246a9c
commit
175d472bea
1 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,12 @@ module Haml
|
|||
if File.exist?(app_layout_from)
|
||||
if !File.exist?(app_layout_to)
|
||||
`html2haml #{app_layout_from.shellescape} #{app_layout_to.shellescape}`
|
||||
puts "Success! app/views/layouts/application.html.haml is created.\n" \
|
||||
"Please remove the erb file: app/views/layouts/application.html.erb"
|
||||
if $?.success?
|
||||
puts "Success! app/views/layouts/application.html.haml is created.\n" \
|
||||
"Please remove the erb file: app/views/layouts/application.html.erb"
|
||||
else
|
||||
puts "Error! Failed to execute html2haml command."
|
||||
end
|
||||
else
|
||||
puts "Error! There is a file named app/views/layouts/application.html.haml already."
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue