chore: explain GIT_ASKPASS behavior in docs (#12784)

* chore: docs explaining GIT_ASKPASS behavior

- VSCode configuration requirements
This commit is contained in:
Steven Masley
2024-03-28 13:59:03 -05:00
committed by GitHub
parent 79441e3609
commit b785e996f8
3 changed files with 51 additions and 6 deletions
+7
View File
@@ -2,6 +2,7 @@ package cli
import (
"encoding/json"
"fmt"
"golang.org/x/xerrors"
@@ -9,6 +10,7 @@ import (
"github.com/coder/coder/v2/cli/cliui"
"github.com/coder/coder/v2/codersdk/agentsdk"
"github.com/coder/pretty"
"github.com/coder/serpent"
)
@@ -68,6 +70,11 @@ fi
ctx, stop := inv.SignalNotifyContext(ctx, StopSignals...)
defer stop()
if r.agentToken == "" {
_, _ = fmt.Fprint(inv.Stderr, pretty.Sprintf(headLineStyle(), "No agent token found, this command must be run from inside a running workspace.\n"))
return xerrors.Errorf("agent token not found")
}
client, err := r.createAgentClient()
if err != nil {
return xerrors.Errorf("create agent client: %w", err)