Skip to content

Commit

Permalink
fix(run): update default buffer to 100MB
Browse files Browse the repository at this point in the history
fix #18
  • Loading branch information
azu committed Oct 29, 2019
1 parent 3390ceb commit 9fbe9f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/@jxa/run/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ JSON.stringify({ result: out });
`;
return executeInOsa(code, args);
}

// Same with execa
// https://github.com/sindresorhus/execa
const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
/**
* execute the `code` in `osascript`
*/
Expand All @@ -94,7 +96,8 @@ function executeInOsa(code: string, args: any[]) {
{
env: {
OSA_ARGS: JSON.stringify(args)
}
},
maxBuffer: DEFAULT_MAX_BUFFER
},
(err: Error, stdout: any, stderr: any) => {
if (err) {
Expand Down

0 comments on commit 9fbe9f4

Please sign in to comment.