Permalink
Browse files

Merge pull request #40 from 3martini/windows-topic

Windows MSYS Support
  • Loading branch information...
2 parents 535aa3d + 4a03980 commit ca37b93198908805edf8efbe2d3e8045933f46f4 @plusjade plusjade committed Mar 1, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 Rakefile
View
@@ -254,7 +254,7 @@ end # end namespace :theme
# Returns theme manifest hash
def theme_from_git_url(url)
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
- system("git clone #{url} #{tmp_path}")
+ abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}")
manifest = verify_manifest(tmp_path)
new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
@@ -273,9 +273,11 @@ end
#
# Returns theme manifest hash
def verify_manifest(theme_path)
- manifest = File.join(theme_path, "manifest.yml")
- abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest
- manifest = YAML.load_file(manifest)
+ manifest_path = File.join(theme_path, "manifest.yml")
+ manifest_file = File.open( manifest_path )
+ abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file
+ manifest = YAML.load( manifest_file )
+ manifest_file.close
manifest
end

0 comments on commit ca37b93

Please sign in to comment.