Skip to content

Commit f270200

Browse files
committed
Address review
1 parent 2662cc9 commit f270200

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

omnibus/config/software/existing-agent-package.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525
if destdir != "/"
2626
staged_install_dir = File.join(destdir, install_dir.sub(%r{\A/+}, ""))
2727

28+
# GNU `chmod -R` skips symlinks; `FileUtils.chmod_R` with a symbolic mode stats each
29+
# entry and raises ENOENT on the package's absolute symlinks, which dangle until the
30+
# install dir is repopulated.
31+
command "chmod -R u+rwX #{Shellwords.escape(staged_install_dir)}"
32+
2833
block "Populate install directory from extracted package" do
29-
FileUtils.chmod_R("u+rwX", staged_install_dir)
3034
FileUtils.mkdir_p(install_dir)
3135
FileUtils.cp_r("#{staged_install_dir}/.", install_dir)
3236
end

0 commit comments

Comments
 (0)