harlan-zw / unlighthouse

Scan your entire site with Google Lighthouse in 2 minutes (on average). Open source, fully configurable with minimal setup.
https://unlighthouse.dev
MIT License
3.65k stars 105 forks source link

`--output-path` doesn't allow for absolute paths #187

Closed TheDevMinerTV closed 4 months ago

TheDevMinerTV commented 4 months ago

Describe the bug

When passing the output path to either of the binaries, the files will end up in the current directory joined with the passed in path instead of using the output path as an absolute value.

Reproduction

  1. Run npx @unlighthouse/cli --build-static --output-path /tmp/unlighthouse0123456789 --site https://devminer.xyz
  2. Check your /tmp folder, the files won't be there
  3. Check ./tmp and they'll be there instead

ℹ️ The output will also show the wrong path [Unlighthouse] ✔ Static report is ready for uploading: ./tmp/unlighthouse0123456789 (notice the .)

System / Nuxt Info

System:
    OS: Linux 6.5 Alpine Linux
    CPU: (48) x64 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
    Memory: 62.12 GB / 204.49 GB
    Container: Yes
    Shell: 1.36.1 - /bin/ash
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
  Browsers:
    Chromium: 121.0.6167.8