osx-query 0.1.3 → 0.1.4
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 +28 -4
- package/lib/install.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,14 +72,38 @@ OSX_QUERY_SKIP_SKILLS_PROMPT=1 npm i -g osx-query
|
|
|
72
72
|
|
|
73
73
|
## Troubleshooting
|
|
74
74
|
|
|
75
|
-
If
|
|
75
|
+
If `npm i -g osx-query` succeeds but `osx` is not found, the usual cause is that your npm global bin directory is not on `PATH`.
|
|
76
|
+
|
|
77
|
+
Check where npm installs global binaries:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm prefix -g
|
|
81
|
+
npm bin -g
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then make sure that bin directory is on your shell `PATH`.
|
|
85
|
+
|
|
86
|
+
If `osx` exists but it is the wrong one, check for command shadowing:
|
|
76
87
|
|
|
77
88
|
```bash
|
|
78
|
-
|
|
79
|
-
which osx
|
|
89
|
+
which -a osx
|
|
80
90
|
```
|
|
81
91
|
|
|
82
|
-
|
|
92
|
+
That will show whether another `osx` binary or symlink is being found before the npm-installed one.
|
|
93
|
+
|
|
94
|
+
If the command is found but macOS blocks it, verify the installed binary directly:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
osx --help
|
|
98
|
+
spctl -a -t exec -vv "$(which osx)"
|
|
99
|
+
codesign -dv "$(which osx)" 2>&1 | head
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If queries run but return nothing useful, the problem is usually Accessibility permissions, not installation. Grant access to your terminal in:
|
|
103
|
+
|
|
104
|
+
`System Settings -> Privacy & Security -> Accessibility`
|
|
105
|
+
|
|
106
|
+
If you want to reinstall cleanly:
|
|
83
107
|
|
|
84
108
|
```bash
|
|
85
109
|
npm uninstall -g osx-query
|
package/lib/install.js
CHANGED
|
@@ -88,6 +88,7 @@ function installBinary(extractedRoot, vendorDir) {
|
|
|
88
88
|
fs.mkdirSync(vendorDir, { recursive: true });
|
|
89
89
|
fs.copyFileSync(sourceBinary, targetBinary);
|
|
90
90
|
fs.chmodSync(targetBinary, 0o755);
|
|
91
|
+
return targetBinary;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
function shouldPromptForSkills() {
|
|
@@ -166,8 +167,9 @@ async function main() {
|
|
|
166
167
|
fs.mkdirSync(extractDir, { recursive: true });
|
|
167
168
|
|
|
168
169
|
extract(zipPath, extractDir);
|
|
169
|
-
installBinary(extractDir, vendorDir);
|
|
170
|
-
console.log(
|
|
170
|
+
const installedBinary = installBinary(extractDir, vendorDir);
|
|
171
|
+
console.log(`Installed osx at ${installedBinary}`);
|
|
172
|
+
console.log("Run `osx --help` to get started.");
|
|
171
173
|
await maybePromptForSkills();
|
|
172
174
|
} finally {
|
|
173
175
|
fs.rmSync(tempDir, { recursive: true, force: true });
|