From 7e9ff77c1d243788810b9f472387c242eb4de5ea Mon Sep 17 00:00:00 2001 From: utensil Date: Fri, 7 Jun 2013 23:19:47 +0800 Subject: [PATCH] fix #929 : `cd` in Rakefile in a cross-platform way --- Rakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index bec43d2b..dc76177b 100644 --- a/Rakefile +++ b/Rakefile @@ -76,21 +76,21 @@ end desc "Generate documentation for all middleman gems" task :doc do GEM_PATHS.each do |g| - sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake yard" + Dir.chdir("#{File.join(ROOT, g)}") { sh "#{Gem.ruby} -S rake yard" } end end desc "Run tests for all middleman gems" task :test do GEM_PATHS.each do |g| - sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake test" + Dir.chdir("#{File.join(ROOT, g)}") { sh "#{Gem.ruby} -S rake test" } end end desc "Run specs for all middleman gems" task :spec do GEM_PATHS.each do |g| - sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake spec" + Dir.chdir("#{File.join(ROOT, g)}") { sh "#{Gem.ruby} -S rake spec" } end end