Rake cp permission denied on windows
Here's the rake file.
task :default => :release
task :release do
target = 'releases/' + Time.new.strftime('%Y%m%d')
mkdir_p target
cp Dir开发者_运维知识库["web"], target
end
I get "permission denied - web". what do I have to do to give rake the same rights I have when it runs, in windows.
I had this problem, as simple as the target was readonly. In this case web
might not exist, or might not be readable.
I'm no expert in rake, but where is Dir
declared?
What about using sh?
sh %& copy "#{Dir['web']}" "#{target}" &
精彩评论