diff --git a/docs/utils-reference/getting-started.md b/docs/utils-reference/getting-started.md index 2716a76..e3b3ea0 100644 --- a/docs/utils-reference/getting-started.md +++ b/docs/utils-reference/getting-started.md @@ -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 diff --git a/package-lock.json b/package-lock.json index 20a0681..440070f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@raycast/utils", - "version": "2.2.6", + "version": "2.2.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@raycast/utils", - "version": "2.2.6", + "version": "2.2.7", "license": "MIT", "dependencies": { "dequal": "^2.0.3" diff --git a/package.json b/package.json index b0410d2..526cb8c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/run-applescript.ts b/src/run-applescript.ts index 59f66ab..b86b7e8 100644 --- a/src/run-applescript.ts +++ b/src/run-applescript.ts @@ -103,7 +103,8 @@ export async function runAppleScript( ...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); @@ -123,7 +124,12 @@ export async function runAppleScript( signal, timedOut, command: "osascript", - options, + options: { + humanReadableOutput, + language, + timeout: effectiveTimeout, + ...execOptions, + }, parentError: new Error(), }); }