Windows上的Rake cp权限被拒绝

时间:2022-05-01 22:58:17

Here's the rake file.

这是rake文件。

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.

我得到“许可被拒绝 - 网络”。在Windows中运行时,我需要做些什么来为rake提供相同的权限。

2 个解决方案

#1


0  

I had this problem, as simple as the target was readonly. In this case web might not exist, or might not be readable.

我有这个问题,就像目标是只读一样简单。在这种情况下,Web可能不存在,或者可能不可读。

I'm no expert in rake, but where is Dir declared?

我不是耙子的专家,但Dir在哪里宣布?

#2


0  

What about using sh?

用sh怎么样?

sh %& copy "#{Dir['web']}" "#{target}" &

#1


0  

I had this problem, as simple as the target was readonly. In this case web might not exist, or might not be readable.

我有这个问题,就像目标是只读一样简单。在这种情况下,Web可能不存在,或者可能不可读。

I'm no expert in rake, but where is Dir declared?

我不是耙子的专家,但Dir在哪里宣布?

#2


0  

What about using sh?

用sh怎么样?

sh %& copy "#{Dir['web']}" "#{target}" &