cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

`cloudflared update` exits with 11 instead of 64

Open abeluck opened this issue 4 years ago • 2 comments

Problem

Our ansible role for managing cloudflared expects the cloudflared update command to exit with code 64 when an update occurs. However recently the tool is now exiting with 11.

Where does 64 come from? The help indicates it should be 64:

NAME:
   cloudflared update - Update the agent if a new version exists

USAGE:
   cloudflared update [command options] [arguments...]

DESCRIPTION:
   Looks for a new version on the official download server.
If a new version exists, updates the agent binary and quits.
Otherwise, does nothing.

To determine if an update happened in a script, check for error code 64.

OPTIONS:
   --beta           specify if you wish to update to the latest beta version (default: false)
   --version value  specify a version you wish to upgrade or downgrade to
   --help, -h       show help (default: false)

Reproduce

Install an older version of cloudflared, then run cloudflared update and check the exit code.

Actual Result

The exit code is 11

Expected Result

An exit code of 64

abeluck avatar Jan 27 '21 11:01 abeluck

Thanks for pointing this out! The help was wrong. It'll be fixed in the next version of cloudflared.

adamchalmers avatar Feb 11 '21 14:02 adamchalmers

@chungthuang this can be closed

adamchalmers avatar Jan 03 '24 00:01 adamchalmers