Skip to content

[v15] tsh: skip invalid profiles instead of failing#38514

Merged
zmb3 merged 1 commit intobranch/v15from
bot/backport-38330-branch/v15
Feb 21, 2024
Merged

[v15] tsh: skip invalid profiles instead of failing#38514
zmb3 merged 1 commit intobranch/v15from
bot/backport-38330-branch/v15

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Feb 21, 2024

Backport #38330 to branch/v15

changelog: Ensure that tsh continues to function if one of its profiles is invalid.

The tsh status command attempts to decode one profile per YAML
file in $TSH_HOME. If an error is encountered along the way,
the entire command fails and tsh does not display information
about any profiles.

An especially confusing corner case is when a user mistakenly
places tsh's configuration at $TSH_HOME/config.yaml instead of
$TSH_HOME/config/config.yaml. In this case, the config file is
assumed to be a profile and the user is presentedc with a
confusing error message.

Fix this by skipping over profiles that fail to load but continuing
to report on the ones that load successfully.

Closes #38302
@zmb3 zmb3 added this pull request to the merge queue Feb 21, 2024
Merged via the queue into branch/v15 with commit c293128 Feb 21, 2024
@zmb3 zmb3 deleted the bot/backport-38330-branch/v15 branch February 21, 2024 18:38
@camscale camscale mentioned this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants