Skip to content

Commit cc09ef4

Browse files
committed
cleaner output
1 parent 3130bf5 commit cc09ef4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/dbos/version.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ var versionCmd = &cobra.Command{
4848
if jsonOutput {
4949
return outputJSON(map[string]string{"version": Version})
5050
}
51-
logger.Info("DBOS CLI version", "version", Version, "commit", Commit, "built", BuiltAt)
51+
l := logger.With("version", Version)
52+
if Commit != "" {
53+
l = l.With("commit", Commit)
54+
}
55+
if BuiltAt != "" {
56+
l = l.With("built", BuiltAt)
57+
}
58+
l.Info("DBOS CLI version")
5259
return nil
5360
},
5461
}

0 commit comments

Comments
 (0)