Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

### v2.2.7

- Fixed `runAppleScript` timeout error messages reporting `undefined` instead of the effective timeout.

### v2.2.6

- Fixed an issue where refreshing OAuth tokens would fails for providers that return scope as an array instead of a string
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raycast/utils",
"version": "2.2.6",
"version": "2.2.7",
"description": "Set of utilities to streamline building Raycast extensions",
"author": "Raycast Technologies Ltd.",
"homepage": "https://developers.raycast.com/utilities/getting-started",
Expand Down
10 changes: 8 additions & 2 deletions src/run-applescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ 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 effectiveTimeout = timeout ?? 10000;
const spawnedPromise = getSpawnedPromise(spawned, { timeout: effectiveTimeout });

spawned.stdin.end(script);

Expand All @@ -123,7 +124,12 @@ export async function runAppleScript<T = string>(
signal,
timedOut,
command: "osascript",
options,
options: {
humanReadableOutput,
language,
timeout: effectiveTimeout,
...execOptions,
},
parentError: new Error(),
});
}
Loading