From 9c1ef2a58a5697ec32cd657a30c712dbc29af585 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 14 Jun 2021 17:36:17 +0200 Subject: [PATCH] DEV: Fix `sh: /bin/rm: Argument list too long` (#13371) That error happens when you accrued too many temporary files in `tmp/stylesheet-cache`. --- spec/requests/stylesheets_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/requests/stylesheets_controller_spec.rb b/spec/requests/stylesheets_controller_spec.rb index 04926798acf..7f6f8d6d194 100644 --- a/spec/requests/stylesheets_controller_spec.rb +++ b/spec/requests/stylesheets_controller_spec.rb @@ -19,7 +19,7 @@ describe StylesheetsController do expect(cached.digest).to eq digest # tmp folder destruction and cached - `rm #{Stylesheet::Manager.cache_fullpath}/*` + `rm -rf #{Stylesheet::Manager.cache_fullpath}` get "/stylesheets/desktop_rtl_#{digest}.css" expect(response.status).to eq(200) @@ -34,7 +34,7 @@ describe StylesheetsController do builder = Stylesheet::Manager.new(:desktop, theme.id) builder.compile - `rm #{Stylesheet::Manager.cache_fullpath}/*` + `rm -rf #{Stylesheet::Manager.cache_fullpath}` get "/stylesheets/#{builder.stylesheet_filename.sub(".css", "")}.css" @@ -47,7 +47,7 @@ describe StylesheetsController do builder = Stylesheet::Manager.new(:desktop_theme, theme.id) builder.compile - `rm #{Stylesheet::Manager.cache_fullpath}/*` + `rm -rf #{Stylesheet::Manager.cache_fullpath}` get "/stylesheets/#{builder.stylesheet_filename.sub(".css", "")}.css"