MCPcopy Create free account
hub / github.com/different-ai/opencode-browser / getNativeHostDirs

Function getNativeHostDirs

bin/cli.js:278–295  ·  view source on GitHub ↗
(osName)

Source from the content-addressed store, hash-verified

276}
277
278function getNativeHostDirs(osName) {
279 if (osName === "darwin") {
280 const base = join(homedir(), "Library", "Application Support");
281 return [
282 join(base, "Google", "Chrome", "NativeMessagingHosts"),
283 join(base, "Chromium", "NativeMessagingHosts"),
284 join(base, "BraveSoftware", "Brave-Browser", "NativeMessagingHosts"),
285 ];
286 }
287
288 // linux
289 const base = join(homedir(), ".config");
290 return [
291 join(base, "google-chrome", "NativeMessagingHosts"),
292 join(base, "chromium", "NativeMessagingHosts"),
293 join(base, "BraveSoftware", "Brave-Browser", "NativeMessagingHosts"),
294 ];
295}
296
297function nativeHostManifestPath(dir) {
298 return join(dir, `${NATIVE_HOST_NAME}.json`);

Callers 4

installFunction · 0.85
updateFunction · 0.85
statusFunction · 0.85
uninstallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected