claude-code-kr 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cc-kr.js +5 -5
  2. package/package.json +1 -1
package/bin/cc-kr.js CHANGED
@@ -8,13 +8,13 @@ const mappings = require('../lib/mappings');
8
8
  const hooks = require('../lib/hooks');
9
9
  const pkg = require('../package.json');
10
10
 
11
- // npm global 설치 sudo 필요 여부 체크
11
+ // 실제로 설치된 cckr 디렉토리가 쓰기 가능한지 체크
12
+ // __dirname = .../node_modules/claude-code-kr/bin
13
+ // 부모(.../node_modules/claude-code-kr)가 쓰기 가능하면 sudo 불필요
12
14
  function needsSudo() {
13
15
  try {
14
- const prefix = execSync('npm prefix -g', { encoding: 'utf8' }).trim();
15
- const globalNodeModules = path.join(prefix, 'lib', 'node_modules');
16
- // 디렉토리가 존재하고 쓰기 가능한지 확인
17
- fs.accessSync(globalNodeModules, fs.constants.W_OK);
16
+ const installDir = path.dirname(__dirname); // bin/ 부모
17
+ fs.accessSync(installDir, fs.constants.W_OK);
18
18
  return false;
19
19
  } catch {
20
20
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kr",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Claude Code 한글 패치 CLI — /btw → /근데, /help → /도움, /compact → /압축",
5
5
  "main": "./index.js",
6
6
  "bin": {