Skip to content

Commit

Permalink
Increase max_buffer during preview for large builds (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
uditdc authored Jul 10, 2023
1 parent 422c2b1 commit 87ff197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/commands/function/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ export const run = async (options: any) => {
}

const result = execSync(`echo "${path}" | ${envString} ${runtimePath} ${manifestPath}`, {
cwd: path
cwd: path,
maxBuffer: (10000 * 1024)
}).toString()

if (!manifest.contentType || manifest.contentType === 'json' && result) {
Expand Down Expand Up @@ -194,7 +195,8 @@ export const run = async (options: any) => {
}

const result = execSync(`echo "${stdinString}" | ${envString} ${runtimePath} ${manifestPath}`, {
cwd: path
cwd: path,
maxBuffer: (10000 * 1024)
}).toString()

console.log(result)
Expand Down
3 changes: 2 additions & 1 deletion src/commands/sites/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export const run = async (options: any) => {

fastify.get("*", async (request, reply) => {
const result = execSync(`echo "${decodeURIComponent(request.url.trim())}" | ${envString} ${runtimePath} ${manifestPath}`, {
cwd: path
cwd: path,
maxBuffer: (10000 * 1024)
}).toString()

if (!manifest.contentType || manifest.contentType === 'json' && result) {
Expand Down

0 comments on commit 87ff197

Please sign in to comment.