Skip to content

Commit

Permalink
extended max output buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
evghen1 committed Oct 24, 2022
1 parent 3c2d787 commit 07a0197
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions proxy/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const server = http.createServer((req, res) => {
schema = 'https';
}

exec(`export GOOGLE_APPLICATION_CREDENTIALS=${token} && helm repo add ${repoName} gs://${repoName} && helm repo update `, (error, stdout, stderr) => {
exec(`export GOOGLE_APPLICATION_CREDENTIALS=${token} && helm repo add ${repoName} gs://${repoName} && helm repo update `, {maxBuffer: (2048 * 2048) }, (error, stdout, stderr) => {
if (error || stderr) {
res.statusCode = 500;
console.debug(error);
Expand All @@ -46,7 +46,7 @@ const server = http.createServer((req, res) => {
const pullCommand = `export GOOGLE_APPLICATION_CREDENTIALS=${token} && helm pull --destination /tmp ${chartUrl}`;
let pullResponse = '';
try {
pullResponse = execSync(pullCommand).toString();
pullResponse = execSync(pullCommand, {maxBuffer: (2048 * 2048) },).toString();
} catch (error) {
res.statusCode = 500;
console.debug(error);
Expand All @@ -66,7 +66,7 @@ const server = http.createServer((req, res) => {
res.end(data);
});
} else {
exec(`export GOOGLE_APPLICATION_CREDENTIALS=${token} && cat $(helm env HELM_REPOSITORY_CACHE)/${repoName}-index.yaml `, (error, stdout, stderr) => {
exec(`export GOOGLE_APPLICATION_CREDENTIALS=${token} && cat $(helm env HELM_REPOSITORY_CACHE)/${repoName}-index.yaml `, {maxBuffer: (2048 * 2048) }, (error, stdout, stderr) => {
if (error || stderr) {
res.statusCode = 500;
console.debug(error);
Expand Down

0 comments on commit 07a0197

Please sign in to comment.