开发者

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}" &
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜