Repository navigation
fix: Claude 설정 폴더가 없으면 만들어 기록 보존 설정 저장 (#28) - #30
Merged
Merged
Conversation
- applyRetentionSetting이 settings.json 상위 폴더를 0700으로 만든 뒤 쓴다 - 폴더를 만들지 못하면 전처럼 false를 돌려주고 수동 안내로 간다 - 테스트 2개 추가: 상위 폴더 없음(재현), 상위 경로가 파일(폴백)
7 of 8 tasks
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 #28
~/.claude,~/.config/claude)가 없는 환경에서 Yes를 고르면✓ Set cleanupPeriodDays: 99999 — history is now kept forever.가 나오고, 다시 로그인해도 확인이 뜨지 않는다.! Could not update the file automatically.가 나왔고, 로그인할 때마다 같은 확인과 실패가 되풀이됐다.applyRetentionSetting(src/lib/retention.js)이 상위 폴더를 만들지 않고settings.json.tmp를 써서 ENOENT가 났다. 이 오류를 "권한 문제 등"을 받는 catch가 false로 바꿨다.mkdirSync(dirname(settingsPath), { recursive: true, mode: 0o700 })로 상위 폴더를 만든다src/index.js, 대상 폴더 선택 규칙, README, 안내 문구✅ 테스트
npm test: 263개 통과, 실패 0npm run test:coverage: 통과(전체 lines 97.45%, functions 97.62%,retention.js100%)test/retention.test.js)apply_상위폴더없음_폴더만들고생성: 고치기 전 실패 확인(expected true, actual false), 고친 뒤 통과. 99999 저장, 재검사 때 확인 불필요, POSIX에서 폴더 권한 0700apply_상위경로가파일_예외없이false: 폴더를 만들 수 없으면 예외 없이 false.claude자리에 일반 파일을 두는 케이스로 남겼다(petri 폴더는 저장소 밖이라 이 PR에 없음)node_modules를 읽지 못함, 판정에는 영향 없음)npm pack후npm i -g)는 로컬 전역 설치를 바꾸므로 돌리지 않았다. CI가 확인한다.🤖 Generated with Claude Code