mirror of
https://github.com/coder/coder.git
synced 2026-11-10 05:12:36 +08:00
- Integrates the `agentexec` pkg into the agent and removes the legacy system of iterating over the process tree. It adds some linting rules to hopefully catch future improper uses of `exec.Command` in the package.
22 lines
391 B
Go
22 lines
391 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
_ "time/tzdata"
|
|
|
|
"github.com/coder/coder/v2/agent/agentexec"
|
|
entcli "github.com/coder/coder/v2/enterprise/cli"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) > 1 && os.Args[1] == "agent-exec" {
|
|
err := agentexec.CLI()
|
|
_, _ = fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
var rootCmd entcli.RootCmd
|
|
rootCmd.RunWithSubcommands(rootCmd.EnterpriseSubcommands())
|
|
}
|