Skip to content

Commit

Permalink
exclude vim swp files from rsync (#3677)
Browse files Browse the repository at this point in the history
vim swp files can be unreadable to users, especially if editing when opened with
vim -R as root. This causes the rsync to
fail. Excluding .*.swp files fixes that issue.
  • Loading branch information
ryanbcox authored Jul 17, 2024
1 parent 1561d3f commit be3d660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dashboard/app/models/batch_connect/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def stage(root, context: nil)
staged_root.tap { |p| FileUtils.mkdir_p(p.to_s, mode: 0o0700) unless p.exist? }

# Sync the template files over
oe, s = Open3.capture2e('rsync', '-rlpv', '--exclude', '*.erb', "#{root}/", staged_root.to_s)
oe, s = Open3.capture2e('rsync', '-rlpv', '--exclude', '.*.swp', '--exclude', '*.erb', "#{root}/", staged_root.to_s)
raise oe unless s.success?

# Output user submitted context attributes for debugging purposes
Expand Down

0 comments on commit be3d660

Please sign in to comment.