@kud/foxhop-cli 1.0.0 → 1.0.1

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/dist/cli.js +11 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -242,11 +242,17 @@ var sync = (node, cli, dir = defaultScriptsDir()) => {
242
242
  // src/cli.ts
243
243
  import { fileURLToPath as fileURLToPath2 } from "url";
244
244
  var browserApp = () => process.env.FOXHOP_BROWSER ?? "Firefox Nightly";
245
- var foreground = () => spawn("open", ["-a", browserApp()], {
246
- stdio: "ignore",
247
- detached: true
248
- }).unref();
249
- var openUrl = (url) => spawn("open", [url], { stdio: "ignore", detached: true }).unref();
245
+ var runOpen = (args) => {
246
+ const child = spawn("/usr/bin/open", args, {
247
+ stdio: "ignore",
248
+ detached: true
249
+ });
250
+ child.on("error", () => {
251
+ });
252
+ child.unref();
253
+ };
254
+ var foreground = () => runOpen(["-a", browserApp()]);
255
+ var openUrl = (url) => runOpen([url]);
250
256
  var focus = defineCommand({
251
257
  meta: {
252
258
  name: "focus",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/foxhop-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "foxhop CLI and native messaging host — focus specific Firefox tabs from macOS",
5
5
  "type": "module",
6
6
  "license": "MIT",