Skip to content

Commit

Permalink
runApplescript: Fixed an issue where setting timeout to 0 in `run…
Browse files Browse the repository at this point in the history
…AppleScript` would not work.
  • Loading branch information
thomaslombart committed Nov 21, 2024
1 parent 864ee9f commit 32461b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/utils-reference/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ npm install --save @raycast/utils

## Changelog

### v1.18.1

- Fixed an issue where setting `timeout` to `0` in `runAppleScript` would not work.

### v1.18.0

- Add a new [`executeSQL](./functions/executeSQL.md) function.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raycast/utils",
"version": "1.18.0",
"version": "1.18.1",
"description": "Set of utilities to streamline building Raycast extensions",
"author": "Raycast Technologies Ltd.",
"homepage": "https://developers.raycast.com/utils-reference",
Expand Down Expand Up @@ -51,5 +51,6 @@
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react-hooks": "4.6.0",
"typescript": "5.2.2"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 1 addition & 1 deletion src/run-applescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function runAppleScript<T = string>(
...execOptions,
env: { PATH: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" },
});
const spawnedPromise = getSpawnedPromise(spawned, { timeout: timeout || 10000 });
const spawnedPromise = getSpawnedPromise(spawned, { timeout: timeout ?? 10000 });

spawned.stdin.end(script);

Expand Down

0 comments on commit 32461b0

Please sign in to comment.