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.
- package/bin/cc-kr.js +5 -5
- 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
|
-
//
|
|
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
|
|
15
|
-
|
|
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;
|