Update notice breaks JSON output #669

Closed
opened 2025-12-29 02:21:49 +01:00 by adam · 3 comments
Owner

Originally created by @tmfksoft on GitHub (Mar 13, 2024).

Bug description

When automating client management with Headscale using CLI and --output=json the JSON output is 'broken' by the message starting with "An updated version of Headscale has been found" etc, I can't take the JSON output directly.

Is there a flag to disable this output?

While actually updating obviously fixes this I can't sit checking every 5 minutes for an update.

Environment

I'm running Headscale v0.23.0-alpha2 under Ubuntu 22.0.4, though Headscale does need updating.

To Reproduce

Run the command
headscale users list --output=json

Originally created by @tmfksoft on GitHub (Mar 13, 2024). ## Bug description When automating client management with Headscale using CLI and `--output=json` the JSON output is 'broken' by the message starting with "An updated version of Headscale has been found" etc, I can't take the JSON output directly. Is there a flag to disable this output? While actually updating obviously fixes this I can't sit checking every 5 minutes for an update. ## Environment I'm running Headscale v0.23.0-alpha2 under Ubuntu 22.0.4, though Headscale does need updating. ## To Reproduce Run the command `headscale users list --output=json`
adam added the stalebug labels 2025-12-29 02:21:49 +01:00
adam closed this issue 2025-12-29 02:21:49 +01:00
Author
Owner

@fredrikekre commented on GitHub (Apr 2, 2024):

headscale users list --output json works (note the missing =) so this is an inconsistency in argument parsing where the real argument parser handles it, but the crude check for machine output here 8a8e25a8d1/cmd/headscale/cli/utils.go (L188-L196) doesn't.

@fredrikekre commented on GitHub (Apr 2, 2024): `headscale users list --output json` works (note the missing `=`) so this is an inconsistency in argument parsing where the real argument parser handles it, but the crude check for machine output here https://github.com/juanfont/headscale/blob/8a8e25a8d1e6bc5fa27b7f72f99bbf24b290e0a6/cmd/headscale/cli/utils.go#L188-L196 doesn't.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 2, 2024):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Jul 2, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 9, 2024):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Jul 9, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#669