Skip to content

Fix verbose version output by suppressing startup log for version command#45

Merged
pardeike merged 2 commits intomainfrom
copilot/fix-33778ca0-263d-492f-a2f5-ae7543617b50
Sep 14, 2025
Merged

Fix verbose version output by suppressing startup log for version command#45
pardeike merged 2 commits intomainfrom
copilot/fix-33778ca0-263d-492f-a2f5-ae7543617b50

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 14, 2025

The gabs version command was producing overly verbose output by including the startup log before the actual version information:

$ gabs version
2025-09-14T22:04:22.582+0200	INFO	util/log.go:57	starting gabs	{"version": "0.1.0", "commit": "unknown", "built": "unknown", "subcmd": "version"}
gabs 0.1.0 (unknown)

This makes the command unsuitable for clean terminal usage and scripting scenarios where only the version information is needed.

Changes:

  • Extended the startup log suppression condition in cmd/gabs/main.go to include the version command alongside the existing games command
  • Now both version and games commands produce clean output suitable for terminal usage and automation

After the fix:

$ gabs version
gabs 0.1.0 (unknown)

Verification:

  • gabs version now produces clean output
  • gabs games commands still produce clean output
  • gabs server still shows startup logs as expected for debugging server operations
  • ✅ Invalid commands still show startup logs for error context
  • ✅ All existing tests continue to pass

This change maintains backward compatibility while providing the expected clean output for version queries.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…mand

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Copilot AI changed the title [WIP] Running from the terminal I get this overly verbose gabs version 2025-09-14T22:04:22.582+0200 INFO util/log.go:57 starting gabs {"version": "0.1.0", "commit": "unknown", "built": "unknown", "subcmd": "version"} gabs 0.1.0 (unknown) Fix verbose version output by suppressing startup log for version command Sep 14, 2025
Copilot AI requested a review from pardeike September 14, 2025 20:09
@pardeike pardeike marked this pull request as ready for review September 14, 2025 20:09
@pardeike pardeike merged commit 9a14098 into main Sep 14, 2025
3 checks passed
@pardeike pardeike deleted the copilot/fix-33778ca0-263d-492f-a2f5-ae7543617b50 branch September 14, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants