Skip to content

docs: replace broken mcc --version check with --help - #79

Closed
dogfootman wants to merge 1 commit into
developfrom
fix-doc-mcc-version-check
Closed

dogfootman wants to merge 1 commit into
developfrom
fix-doc-mcc-version-check

Conversation

@dogfootman

Copy link
Copy Markdown
Collaborator

배경

README.md Step 1-1 "Verify mcc Binary"와 docs/running-on-instance.md(ADMINCLI-TECH-014, PR #78)가 둘 다 ./mcc --version으로 사전 바이너리 동작 확인을 안내하는데, 실제로 실행하면 항상 실패한다.

src/cmd/root.go가 Cobra Version 필드를 설정하지 않아 --version 플래그 자체가 등록돼 있지 않다. ./mcc --version은 GLIBC 호환 여부와 무관하게 항상 Error: unknown flag: --version(exit 1)을 낸다 — 라이브로 직접 재현 확인했다. 신규 설치자가 이 단계에서 항상 에러를 보게 되어, 실제 문제(GLIBC 미스매치)와 무관하게 설치가 잘못됐다고 오인하기 쉽다.

변경 내용

./mcc --version./mcc --help로 교체(양쪽 문서 모두). --help는 실제로 동작하고(exit 0, 라이브 확인), 진짜 GLIBC 미스매치가 있을 때는 Cobra가 flag를 파싱하기도 전에 동적 로더가 먼저 죽으므로 --help로도 원래 의도한 GLIBC 스모크 테스트 목적은 그대로 유지된다.

참고

./mcc --version이 항상 실패하는 것은 docs/running-on-instance.md(ADMINCLI-TECH-014, PR #78)가 새로 만든 문제가 아니라 기존 README.md Step 1-1의 기존 버그를 옮겨적으며 그대로 전파한 것 — 이번에 원본까지 같이 고쳤다. 근본 원인(Cobra Version 필드 미등록)은 코드 변경이라 이 문서 PR 범위에서 분리해 별도 이슈로 등록 예정.

Cobra never registers a --version flag on the root command
(src/cmd/root.go has no Version field set), so ./mcc --version
always fails with "Error: unknown flag: --version" regardless of
GLIBC compatibility - the exact thing this step is meant to test.
Verified live. ./mcc --help works and still fails the same way on a
genuine GLIBC mismatch (the dynamic loader errors out before Cobra
ever parses argv), so it's a safe drop-in replacement for the smoke
test's actual purpose.

Found while verifying ADMINCLI-TECH-014 after merge; the running-on-
instance.md copy came from README.md's pre-existing Step 1-1, fixed
both.
@dogfootman

Copy link
Copy Markdown
Collaborator Author

근본 원인을 고치는 #80이 별도로 열려서 이 PR은 닫습니다.

develop에는 지금 ./mcc --version이 그대로 남아 있는데, #80이 머지되면 root.go에 Version 필드가 등록되어 이 커맨드가 실제로 동작하게 됩니다. 즉 문서를 --help로 바꿀 필요 없이 기존 --version 안내가 그대로 맞아지므로, 이 PR의 우회 수정은 불필요해집니다.

@dogfootman dogfootman closed this Sep 3, 2026
@dogfootman
dogfootman deleted the fix-doc-mcc-version-check branch September 3, 2026 00:12
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