Repository navigation
fix: 전역 폴더에 쓸 권한이 없으면 업데이트 대신 sudo 명령 안내 (#33) - #34
Merged
Merged
Conversation
- runUpdate가 npm 전역 폴더 쓰기 권한을 먼저 확인하고, EACCES면(macOS·Linux) npm을 돌리지 않는다 - 대신 `sudo npm install -g tokenphage@latest`를 안내하고 대시보드로 돌아간다 - 쓸 수 있는 경우, 전역 설치가 아닌 경우, Windows는 전과 같다 - 테스트 3개 추가: 쓸 수 없는 전역 폴더(재현), 쓸 수 있는 전역 폴더, 전역 설치 아님 - README 업데이트 절에 sudo 안내 추가
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🏷️ 작업 유형
📋 변경 사항
Closes #33
전역 npm 폴더가 root 소유이면(
sudo로 설치한 경우) 메뉴 업데이트가 npm을 실행하지 않고, 그대로 쓸 수 있는sudo명령을 안내합니다. CLI가 sudo를 직접 실행하지는 않습니다.src/lib/updater.js가 쓰기 권한을 확인하지 않고 현재 계정으로npm install -g를 실행해 EACCES로 실패했습니다. 실패 뒤에는 방금 실패한 명령을 다시 안내해서, 같은 계정으로는 업데이트할 수 없었습니다.npm root -g폴더에access(W_OK)를 확인합니다. EACCES이면(macOS·Linux) npm을 건너뛰고 안내합니다.isGlobalInstall()을globalInstallRoot()로 바꿔 전역 폴더 경로를 돌려줍니다(npm root -g호출은 1회 그대로).needsSudo()를 추가했습니다.2026.12.1(별도 커밋)새 안내 문구:
✅ 테스트
npm test: 266/266 통과npm run test:coverage: 통과🤖 Generated with Claude Code