mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: infer workspace from env in coder support bundle (#24617)
When running `coder support bundle` inside a workspace without arguments, the command now infers the workspace and agent from the `CODER_WORKSPACE_NAME`, `CODER_WORKSPACE_OWNER_NAME`, and `CODER_WORKSPACE_AGENT_NAME` environment variables set by the workspace agent. Previously, running without arguments inside a workspace produced an incomplete bundle with no workspace info, agent logs, or connection diagnostics, despite the environment having all the information needed to resolve the current workspace. Also updates the usage string from `<workspace>` to `[<workspace>]` to reflect that the argument has always been optional. Closes #24615
This commit is contained in:
+4
-3
@@ -1,13 +1,14 @@
|
||||
coder v0.0.0-devel
|
||||
|
||||
USAGE:
|
||||
coder support bundle [flags] <workspace> [<agent>]
|
||||
coder support bundle [flags] [<workspace>] [<agent>]
|
||||
|
||||
Generate a support bundle to troubleshoot issues connecting to a workspace.
|
||||
|
||||
This command generates a file containing detailed troubleshooting information
|
||||
about the Coder deployment and workspace connections. You must specify a
|
||||
single workspace (and optionally an agent name).
|
||||
about the Coder deployment and workspace connections. You may specify a single
|
||||
workspace (and optionally an agent name). When run inside a workspace, the
|
||||
workspace and agent are inferred from the environment if not provided.
|
||||
|
||||
OPTIONS:
|
||||
-O, --output-file string, $CODER_SUPPORT_BUNDLE_OUTPUT_FILE
|
||||
|
||||
Reference in New Issue
Block a user