- 
                Notifications
    
You must be signed in to change notification settings  - Fork 266
 
Open
Labels
Description
Steps to reproduce
The following paths are added to my assets_manifest in deploy.rb:
  desc "define assets manifests files"
  task :set_assets_manifests do
    on roles(:app) do
      within release_path do
        with rails_env: fetch(:rails_env) do
          set :assets_manifests, [
            release_path.join("public", "vite", ".vite", "manifest*.*"),
            release_path.join("public", fetch(:assets_prefix), "manifest*.*"),
            release_path.join("public", fetch(:assets_prefix), ".sprockets-manifest*")
          ]
        end
      end
    end
  endListing the directory contents of these paths on the server yields:
$ ls -a public/vite/.vite/manifest*.*
public/vite/.vite/manifest-assets.json
public/vite/.vite/manifest-assets.json.gz
public/vite/.vite/manifest.json
public/vite/.vite/manifest.json.gz
$ ls -a public/assets/manifest*.*
public/assets/manifest-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.js
public/assets/manifest.js
public/assets/manifest-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.js.gz
public/assets/manifest.js.gz
$ ls -a public/assets/.sprockets-manifest*
public/assets/.sprockets-manifest-415461b893c1f289238ea242950f61cb.jsonExpected behavior
I expect the files in the listed directories to appear in the assets_manifest_backup directory after deployment.
Actual behavior
What happens instead is the files that only match the first path in assets_manifests are backed up.
$ ls -a assets_manifest_backup/
.  
..  
manifest-assets.json  
manifest-assets.json.gz  
manifest.json  
manifest.json.gzIs the return on L111 of assets.rake the culprit, perhaps?
fetch(:assets_manifests).each do |candidate|
  return capture(:ls, candidate).strip.gsub(/(\r|\n)/, ' ') if test(:ls, candidate)
endSystem configuration
Ruby  3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin20]
Rubygems 3.5.11
Rails  7.1.4
Bundler  2.4.5