DEV: Fix `sh: /bin/rm: Argument list too long` (#13371)

That error happens when you accrued too many temporary files in `tmp/stylesheet-cache`.
This commit is contained in:
Jarek Radosz 2021-06-14 17:36:17 +02:00 committed by GitHub
parent 6abc45e57b
commit 9c1ef2a58a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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"