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:
Generated
+2
-2
@@ -6,13 +6,13 @@ Generate a support bundle to troubleshoot issues connecting to a workspace.
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder support bundle [flags] <workspace> [<agent>]
|
||||
coder support bundle [flags] [<workspace>] [<agent>]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
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).
|
||||
This command generates a file containing detailed troubleshooting information 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
|
||||
|
||||
Reference in New Issue
Block a user