From a833c4b505c65850d2741bd19c934c4c6f811bdb Mon Sep 17 00:00:00 2001 From: Walter Franzini Date: Fri, 7 Apr 2017 16:18:46 +0200 Subject: [PATCH 1/3] raise maxBuffer (close #1) --- in.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/in.js b/in.js index 9eed83a..f45821d 100644 --- a/in.js +++ b/in.js @@ -67,7 +67,7 @@ process.stdin.on("data", stdin => { // TODO: urlencode cmdLine += ' "' + repository + '" .'; - exec(cmdLine, {cwd: destDir}, (err, stdout, stderr) => { + exec(cmdLine, {cwd: destDir, maxBuffer: 8192*1024}, (err, stdout, stderr) => { // TODO: We can generate an incredible amount of output for large repos. // Stream this and check each line as it passes. if (stderr && stderr !== "") { From 3db8d404b2554172f7d098ef844dc0f59e0da190 Mon Sep 17 00:00:00 2001 From: Walter Franzini Date: Fri, 7 Apr 2017 16:19:15 +0200 Subject: [PATCH 2/3] fix an off by 1 error --- in.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/in.js b/in.js index f45821d..4e6fc46 100644 --- a/in.js +++ b/in.js @@ -92,7 +92,7 @@ process.stdin.on("data", stdin => { fail(new Error('unexpected svn output. expected revision, got "' + lines.slice(lines.length - 5).join("\n") + '"'), cmdLine); } - const rev = revLine.substr(header.length, revLine.length - header.length - 2); + const rev = revLine.substr(header.length, revLine.length - header.length - 1); success({ "version": { "revision": rev From 9eb99180f2b7a7e3cd0940920694a617e04def29 Mon Sep 17 00:00:00 2001 From: Walter Franzini Date: Wed, 11 Oct 2017 16:40:26 +0200 Subject: [PATCH 3/3] install locales and locales-all --- Dockerfile | 9 ++++++--- in.js | 11 ++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 699e67c..086c852 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,12 @@ COPY out.js out COPY shared.js shared.js COPY package.json package.json -# TODO: Clean out cached data that apt generates. See how sonatype/nexus does it. -RUN apt-get update & \ - apt-get install subversion & \ +RUN apt-get update --yes && \ + apt-get install --yes \ + subversion \ + locales locales-all && \ + apt-get autoremove --yes && \ + apt-get clean --yes && \ npm install --quiet RUN chmod a+x check in out diff --git a/in.js b/in.js index 4e6fc46..34001b1 100644 --- a/in.js +++ b/in.js @@ -67,7 +67,16 @@ process.stdin.on("data", stdin => { // TODO: urlencode cmdLine += ' "' + repository + '" .'; - exec(cmdLine, {cwd: destDir, maxBuffer: 8192*1024}, (err, stdout, stderr) => { + let options = { + cwd: destDir, + maxBuffer: 8192*1024, + env: { + LANG: "en_US.UTF-8", + LANGUAGE: "en_US:en", + LC_ALL: "en_US.UTF-8" + } + }; + exec(cmdLine, options, (err, stdout, stderr) => { // TODO: We can generate an incredible amount of output for large repos. // Stream this and check each line as it passes. if (stderr && stderr !== "") {