File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ end # end namespace :theme
254254# Returns theme manifest hash
255255def theme_from_git_url ( url )
256256 tmp_path = JB ::Path . build ( :theme_packages , :node => "_tmp" )
257- system ( "git clone #{ url } #{ tmp_path } " )
257+ abort ( "rake aborted: system call to git clone failed" ) if ! system ( "git clone #{ url } #{ tmp_path } " )
258258 manifest = verify_manifest ( tmp_path )
259259 new_path = JB ::Path . build ( :theme_packages , :node => manifest [ "name" ] )
260260 if File . exist? ( new_path ) && ask ( "=> #{ new_path } theme package already exists. Override?" , [ 'y' , 'n' ] ) == 'n'
273273#
274274# Returns theme manifest hash
275275def verify_manifest ( theme_path )
276- manifest = File . join ( theme_path , "manifest.yml" )
277- abort ( "rake aborted: repo must contain valid manifest.yml" ) unless File . exist? manifest
278- manifest = YAML . load_file ( manifest )
276+ manifest_path = File . join ( theme_path , "manifest.yml" )
277+ manifest_file = File . open ( manifest_path )
278+ abort ( "rake aborted: repo must contain valid manifest.yml" ) unless File . exist? manifest_file
279+ manifest = YAML . load ( manifest_file )
280+ manifest_file . close
279281 manifest
280282end
281283
You can’t perform that action at this time.
0 commit comments