mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: add agent exec abstraction (#15717)
This commit is contained in:
@ -309,6 +309,11 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
|
||||
)
|
||||
}
|
||||
|
||||
execer, err := agentexec.NewExecer()
|
||||
if err != nil {
|
||||
return xerrors.Errorf("create agent execer: %w", err)
|
||||
}
|
||||
|
||||
agnt := agent.New(agent.Options{
|
||||
Client: client,
|
||||
Logger: logger,
|
||||
@ -333,6 +338,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
|
||||
|
||||
PrometheusRegistry: prometheusRegistry,
|
||||
BlockFileTransfer: blockFileTransfer,
|
||||
Execer: execer,
|
||||
})
|
||||
|
||||
promHandler := agent.PrometheusMetricsHandler(prometheusRegistry, logger)
|
||||
|
Reference in New Issue
Block a user