开发者

Rake cp permission denied on windows

开发者 https://www.devze.com 2023-01-26 18:09 出处:网络
Here\'s the rake file. task :default=> :release task :release do target = \'releases/\' + Time.new.strftime(\'%Y%m%d\')

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

精彩评论

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