Skip to content

Commit 1e65a00

Browse files
johnstcnkylecarbs
authored andcommitted
fix: coderd: dev mode should show verbose output by default (#1898)
* check buildinfo for devel prerelease tag and show verbose output if so
1 parent 3c27fdb commit 1e65a00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"path/filepath"
2020
"time"
2121

22+
"github.com/coder/coder/buildinfo"
2223
"github.com/coder/coder/provisioner/echo"
2324

2425
"github.com/briandowns/spinner"
@@ -29,6 +30,7 @@ import (
2930
"github.com/prometheus/client_golang/prometheus/promhttp"
3031
"github.com/spf13/cobra"
3132
sdktrace "go.opentelemetry.io/otel/sdk/trace"
33+
"golang.org/x/mod/semver"
3234
"golang.org/x/oauth2"
3335
xgithub "golang.org/x/oauth2/github"
3436
"golang.org/x/xerrors"
@@ -98,7 +100,8 @@ func server() *cobra.Command {
98100
Short: "Start a Coder server",
99101
RunE: func(cmd *cobra.Command, args []string) error {
100102
logger := slog.Make(sloghuman.Sink(os.Stderr))
101-
if verbose {
103+
buildModeDev := semver.Prerelease(buildinfo.Version()) == "-devel"
104+
if verbose || buildModeDev {
102105
logger = logger.Leveled(slog.LevelDebug)
103106
}
104107

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy