Skip to content

Commit ca37b93

Browse files
committed
Merge pull request #40 from 3martini/windows-topic
Windows MSYS Support
2 parents 535aa3d + 4a03980 commit ca37b93

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Rakefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ end # end namespace :theme
254254
# Returns theme manifest hash
255255
def 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'
@@ -273,9 +273,11 @@ end
273273
#
274274
# Returns theme manifest hash
275275
def 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
280282
end
281283

0 commit comments

Comments
 (0)