Files
coder/cmd/coder/main.go
T
Kyle Carberry ccd061652b feat: Add built-in PostgreSQL for simple production setup (#2345)
* feat: Add built-in PostgreSQL for simple production setup

Fixes #2321.

* Use fork of embedded-postgres for cache path
2022-06-15 16:02:18 -05:00

28 lines
418 B
Go

package main
import (
"errors"
"fmt"
"math/rand"
"os"
"time"
_ "time/tzdata"
"github.com/coder/coder/cli"
"github.com/coder/coder/cli/cliui"
)
func main() {
rand.Seed(time.Now().UnixMicro())
cmd, err := cli.Root().ExecuteC()
if err != nil {
if errors.Is(err, cliui.Canceled) {
os.Exit(1)
}
cobraErr := cli.FormatCobraError(err, cmd)
_, _ = fmt.Fprintln(os.Stderr, cobraErr)
os.Exit(1)
}
}