Closed I-0h closed 2 months ago
Thanks for the issue, will jump on it when I have a chance. PRs welcome otherwise :)
also running just unlighthouse-ci
for me deleted old reports I created with unlighthouse
Have pushed up a fix for this, it would no longer attempt to delete the output path, only the generated runtime folder which has a path as <outputPath>/<siteUrl>/<cacheKey>
which should avoid anything accidental happening.
also running just
unlighthouse-ci
for me deleted old reports I created withunlighthouse
The CI will always reset the cache, I'd suggest just using unlighthouse
Describe the bug
Using
unlighthouse-ci --output-path= <path>
removes the target directory. Specifying a path can have catastrophic effects if the command is run with the wrong permissions or on an unprotected directory.Reproduction
unlighthouse-ci --output-path= <an_unprotected_path_with_stuff_you_want_to_keep>
System / Nuxt Info
Resolution
Prevent this behavior by only attempting to remove
reports/
if it exists and clearly document CI option behavior.