Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e65a00

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 parent3c27fdb commit1e65a00

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-
ifverbose {
103+
buildModeDev:=semver.Prerelease(buildinfo.Version())=="-devel"
104+
ifverbose||buildModeDev {
102105
logger=logger.Leveled(slog.LevelDebug)
103106
}
104107

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp