Skip to content

Display environment context in error messages like 'Try logging in using coder login <url>'#45

Closed
cdr-robot wants to merge 1 commit into
mainfrom
fix/env-vars-error-messages
Closed

Display environment context in error messages like 'Try logging in using coder login <url>'#45
cdr-robot wants to merge 1 commit into
mainfrom
fix/env-vars-error-messages

Conversation

@cdr-robot
Copy link
Copy Markdown
Contributor

Summary

  • Modified error messages to respect environment variables like CODER_URL and CODER_SSH_CONFIG_BINARY_PATH for better user experience
  • Updated CLI logout messages and unauthorized API error responses to include custom binary path if configured
  • Updated tests to match the new message format

Test plan

  • Set CODER_SSH_CONFIG_BINARY_PATH and CODER_URL environment variables
  • Verify the custom binary path and URL appear in error messages
  • Verify existing tests pass with the updated message format

Fixes #44

…in using coder login <url>'

Modified error messages to respect environment variables like CODER_URL and
CODER_SSH_CONFIG_BINARY_PATH when displaying suggested commands.
This makes the CLI more user-friendly in organizational settings where
these variables are pre-configured.

Closes #44
@github-actions github-actions Bot added the stale label May 5, 2025
@github-actions github-actions Bot closed this May 9, 2025
@github-actions github-actions Bot deleted the fix/env-vars-error-messages branch November 1, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display environment context in error messages like 'Try logging in using coder login <url>'

1 participant