cli icon indicating copy to clipboard operation
cli copied to clipboard

[FEATURE REQUEST] Ability to hide "update available" text, for specific subcommands

Open case-fastly opened this issue 8 months ago • 2 comments

Is your feature request related to a problem? Please describe.

$(fastly profile token) is a handy way to access an API token because it simply prints the token… unless a CLI update is available, in which case it outputs the following:

$ fastly profile token
{token}

A new version of the Fastly CLI is available.
Current version: 11.2.0
Latest version: 11.3.0
Run `fastly update` to get the latest version.

Tools that assume the fastly profile token output will only be the {token} string will break when they encounter the "A new version…" text.

Describe the solution you'd like

Thinking out loud, there are probably a set of commands that make sense to have the "Update available" text be visible by default, and another set of commands that probably don't need to show it. (e.g. profile token)

case-fastly avatar Jun 11 '25 22:06 case-fastly

Confirmed... the 'update available' text is sent to standard output, which will interfere with consumption of that output. This applies to many things, including all commands which are able to produce JSON output, in which case it doesn't apply to the command itself but the mode that command is operating in.

kpfleming avatar Jun 12 '25 17:06 kpfleming

This is already possible, by adding --quiet to the command line.

kpfleming avatar Jun 26 '25 20:06 kpfleming