Skip to content

Commit 284f5af

Browse files
make the comment easy to understand
1 parent 8fce18a commit 284f5af

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎bundle/deploy/filer.go‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ func (s stateFiler) Read(ctx context.Context, path string) (io.ReadCloser, error
4949
}
5050

5151
var buf bytes.Buffer
52-
// Read via the raw apiClient.Do (not the SDK's Workspace.Download) so
53-
// auth.WorkspaceIDHeaders can drop the CLI-only "none" workspace-id sentinel
54-
// that Download would send literally. See PR #6149 for the write-path equivalent.
52+
// We read via the raw apiClient.Do so the workspace-id routing header goes
53+
// through auth.WorkspaceIDHeaders, which drops the CLI-only "none" sentinel
54+
// (auth.WorkspaceIDNone, written by `auth login --skip-workspace`). The SDK's
55+
// Workspace client would forward that sentinel as a literal workspace id
56+
// unless we special-cased it; reusing the shared helper here keeps the change
57+
// small.
5558
urlPath := "/api/2.0/workspace/export?path=" + url.QueryEscape(absPath) + "&direct_download=true"
5659
err = s.apiClient.Do(ctx, http.MethodGet, urlPath, auth.WorkspaceIDHeaders(s.apiClient.Config), nil, nil, &buf)
5760
if err != nil {

0 commit comments

Comments
 (0)