firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.01k stars 929 forks source link

Linux install using automatic script, but recommended using npm #7293

Closed ImBIOS closed 2 months ago

ImBIOS commented 3 months ago

[REQUIRED] Environment info

firebase-tools: 13.10.2

Platform: Ubuntu 22.04.4 LTS

[REQUIRED] Test case

Sorry, currently I don't know how to make tests like this.

[REQUIRED] Steps to reproduce

Have an outdated firebase-cli/firebase-tools

[REQUIRED] Expected behavior

   ╭───────────────────────────────────────────────────────────────────╮
   │                                                                   │
   │                Update available 13.10.2 → 13.11.1                 │
   │    To update to the latest version using automatic script, run    │
   │       curl -sL https://firebase.tools | upgrade=true bash         │
   │   For other CLI management options, visit the CLI documentation   │
   │                                                                   │
   │                                                                   │
   │                                                                   │
   ╰───────────────────────────────────────────────────────────────────╯

󰀵  󱑍 16:04  ﱮ codelab-friendlyeats-web    main ? via 🍞 v1.1.12 via  v20.14.0   1m29s 
 ✗  which firebase
/usr/local/bin/firebase

󰀵  󱑍 16:05  ﱮ codelab-friendlyeats-web    main ? via 🍞 v1.1.12 via  v20.14.0 
 ➜  curl -sL https://firebase.tools | upgrade=true bash

[REQUIRED] Actual behavior

   ╭───────────────────────────────────────────────────────────────────╮
   │                                                                   │
   │                Update available 13.10.2 → 13.11.1                 │
   │          To update to the latest version using npm, run           │
   │                   npm install -g firebase-tools                   │
   │   For other CLI management options, visit the CLI documentation   │
   │                                                                   │
   │                                                                   │
   │                                                                   │
   ╰───────────────────────────────────────────────────────────────────╯

󰀵  󱑍 16:04  ﱮ codelab-friendlyeats-web    main ? via 🍞 v1.1.12 via  v20.14.0   1m29s 
 ✗  which firebase
/usr/local/bin/firebase

󰀵  󱑍 16:05  ﱮ codelab-friendlyeats-web    main ? via 🍞 v1.1.12 via  v20.14.0 
 ➜  curl -sL https://firebase.tools | upgrade=true bash
aalej commented 3 months ago

Thanks for the report @ImBIOS. I agree that a log message showing the correct update method would be expected behavior here. I'll discuss this with our engineering team so that the message can be improved.

In the meantime, if anyone would like to try to fix the message, feel free to submit a PR!

joehan commented 3 months ago

Some code pointers for implementing this:

Thanks for reporting + suggesting this @ImBIOS!