Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0637d64475 | ||
|
|
749f39fdc2 | ||
|
|
b92360d4e2 |
No files matched your search
@@ -1,5 +1,11 @@
|
||||
## ChangeLog
|
||||
|
||||
### v1.19.1
|
||||
|
||||
#### Fixes
|
||||
|
||||
- #123 - Install builder: remove target file before copying to avoid errors due to overwriting read-only files
|
||||
|
||||
### v1.19.0
|
||||
|
||||
#### New Features
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
rscons (1.19.0)
|
||||
rscons (1.19.1)
|
||||
json (>= 1.8, < 3.0)
|
||||
|
||||
GEM
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Rscons::Environment.new do |env|
|
||||
env.Install("dest", "install.rb")
|
||||
end
|
||||
@@ -47,6 +47,7 @@ module Rscons
|
||||
printed_message = true
|
||||
end
|
||||
cache.mkdir_p(File.dirname(dest))
|
||||
FileUtils.rm_f(dest)
|
||||
FileUtils.cp(src, dest, :preserve => true)
|
||||
end
|
||||
cache.register_build(dest, :Copy, [src], env)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Rscons
|
||||
# gem version
|
||||
VERSION = "1.19.0"
|
||||
VERSION = "1.19.1"
|
||||
end
|
||||
@@ -1002,6 +1002,22 @@ EOF
|
||||
expect(lines(result.stdout)).to eq ["Install inst.exe"]
|
||||
end
|
||||
|
||||
it "overwrites a read-only file" do
|
||||
test_dir("build_dir")
|
||||
|
||||
FileUtils.chmod("a=r", "install.rb")
|
||||
result = run_test(rsconsfile: "install_read_only.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to eq ["Install dest"]
|
||||
|
||||
FileUtils.rm_f("install.rb")
|
||||
File.binwrite("install.rb", "hi")
|
||||
FileUtils.chmod("a=r", "install.rb")
|
||||
result = run_test(rsconsfile: "install_read_only.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to eq ["Install dest"]
|
||||
end
|
||||
|
||||
it "operates the same as a Copy builder" do
|
||||
test_dir("build_dir")
|
||||
|
||||
|
||||
Reference in new issue
Block a user