We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f3f08f9 + 6e70fdd commit e26b5f7Copy full SHA for e26b5f7
1 file changed
Rakefile
@@ -6,8 +6,8 @@ task :switch_theme, :theme do |t, args|
6
theme_path = File.join(File.dirname(__FILE__), "_includes", "themes", args.theme)
7
layouts_path = File.join(File.dirname(__FILE__), "_layouts")
8
9
- abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless Dir.exists?(theme_path)
10
- abort("rake aborted: './_layouts' directory not found.") unless Dir.exists?(layouts_path)
+ abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless FileTest.directory?(theme_path)
+ abort("rake aborted: './_layouts' directory not found.") unless FileTest.directory?(layouts_path)
11
12
Dir.glob("#{theme_path}/*") do |filename|
13
puts "Generating '#{args.theme}' layout: #{File.basename(filename)}"
0 commit comments