Skip to content

Commit a481262

Browse files
committed
fix: logic error in AppVersion
Signed-off-by: Christoph Hoopmann <choopm@0pointer.org>
1 parent 93212cc commit a481262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var AppVersion = "unknown"
3737
// VersionCommand a version *cobra.Command constructor to print version information.
3838
// Supply your build tag as version and it will add runtime and compiler details.
3939
func VersionCommand(version string) func(log *slog.Logger) *cobra.Command {
40-
if version != "" {
40+
if version == "" {
4141
AppVersion = "unknown"
4242
}
4343

0 commit comments

Comments
 (0)