Skip to content

Commit

Permalink
actions/sync/shared-config: fix relative symlinks.
Browse files Browse the repository at this point in the history
The previous implementation was not working as expected.
  • Loading branch information
MikeMcQuaid committed Jun 14, 2024
1 parent 779bedf commit d5ae259
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/sync/shared-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def git(*args)
if [ruby_version, "Gemfile", "Gemfile.lock"].include?(docs_path_basename) &&
(target_path/docs_path_basename).exist?
FileUtils.rm target_docs_path
File.symlink((target_path/docs_path_basename).relative_path_from(target_docs_path.dirname), target_docs_path)
Dir.chdir target_path do
FileUtils.ln_s "../#{docs_path_basename}", "."
end
else
FileUtils.cp docs_path, target_docs_path
end
Expand Down

0 comments on commit d5ae259

Please sign in to comment.