lib/jekyll/bower_plugin.rb in jekyll-bower-1.1.1 vs lib/jekyll/bower_plugin.rb in jekyll-bower-1.1.2
- old
+ new
@@ -29,10 +29,14 @@
if site.config['bower']
print "Resolving bower individually configured in config" + "\n"
site.config['bower'].each do |name, library|
unless File.exists?('bower_components' + File::SEPARATOR + name)
bower_command = 'bower install ' + library
- system(bower_command)
+ unless system(bower_command)
+ print "Trying resolving bower with allow-root" + "\n"
+ system(bower_command + ' --allow-root')
+ end
+
if library =~ URI::regexp
print "Identified bower downloaded dependency is a URL" + "\n"
print "Performing rename activity if possible" + "\n"
uri = URI.parse(library)
filename = File.basename(uri.path, ".*")
\ No newline at end of file