@mac-bug-screenshot/native-host 1.0.3 → 1.0.5
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/README.md +2 -1
- package/bin/install.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ mac-bug-screenshot-install <확장_프로그램_ID>
|
|
|
22
22
|
## 게시 정보
|
|
23
23
|
|
|
24
24
|
- npm 패키지: https://www.npmjs.com/package/@mac-bug-screenshot/native-host
|
|
25
|
-
- 현재 버전: 1.0.
|
|
25
|
+
- 현재 버전: 1.0.4
|
|
26
26
|
|
|
27
27
|
## 문제 해결
|
|
28
28
|
|
|
@@ -31,3 +31,4 @@ mac-bug-screenshot-install <확장_프로그램_ID>
|
|
|
31
31
|
npm install -g @mac-bug-screenshot/native-host@latest
|
|
32
32
|
mac-bug-screenshot-install <확장_프로그램_ID>
|
|
33
33
|
```
|
|
34
|
+
- nvm 사용 시에도 `npm root -g` 기준 경로로 자동 설정됩니다.
|
package/bin/install.js
CHANGED
|
@@ -35,13 +35,18 @@ function main() {
|
|
|
35
35
|
.replace(/__HOST_PATH__/g, WRAPPER_PATH)
|
|
36
36
|
.replace(/__EXTENSION_ID__/g, extensionId);
|
|
37
37
|
|
|
38
|
+
if (!fs.existsSync(HOST_PATH)) {
|
|
39
|
+
console.error("host.js를 찾을 수 없습니다:", HOST_PATH);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
fs.mkdirSync(WRAPPER_DIR, { recursive: true });
|
|
39
44
|
const wrapperScript = [
|
|
40
45
|
"#!/bin/sh",
|
|
41
46
|
`NODE_PATH="${process.execPath}"`,
|
|
42
47
|
`HOST_PATH="${HOST_PATH}"`,
|
|
43
48
|
'exec "$NODE_PATH" "$HOST_PATH"'
|
|
44
|
-
].join("\n");
|
|
49
|
+
].join("\n") + "\n";
|
|
45
50
|
fs.writeFileSync(WRAPPER_PATH, wrapperScript);
|
|
46
51
|
fs.chmodSync(WRAPPER_PATH, 0o755);
|
|
47
52
|
|