summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2024-05-03 19:54:04 +0200
committerAndreas Fankhauser hiddenalpha.ch2024-05-03 19:54:04 +0200
commitd504a9d296031b2c7593a404d07bc6190242568e (patch)
tree23bc38e02b366890e63cf2cd49f8faa26a0d9e72
parent401bf00c23fd4befcc99157ffd606f6b56ba1588 (diff)
downloadUnspecifiedGarbage-d504a9d296031b2c7593a404d07bc6190242568e.zip
UnspecifiedGarbage-d504a9d296031b2c7593a404d07bc6190242568e.tar.gz
In NoSlim helper, handle empty array.
-rw-r--r--doc/note/links/links.txt1
-rw-r--r--src/main/nodejs/paisa-nonslim/foo.js15
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/note/links/links.txt b/doc/note/links/links.txt
index 25dedde..049363c 100644
--- a/doc/note/links/links.txt
+++ b/doc/note/links/links.txt
@@ -571,6 +571,7 @@ Links (Aka argument amplifiers)
## Angular is terrible
- [Why angular sucks](https://medium.com/dirtyjs/why-angular-2-4-5-6-sucks-afb36567ad68)
+- [JS bloat everywhere](https://tonsky.me/blog/js-bloat/)
## java try-with-resources behavior
[Exception Scenarios for Java's try-with-resources](https://dev.to/moaxcp/exception-scenarios-for-java-s-try-with-resources-63m)
diff --git a/src/main/nodejs/paisa-nonslim/foo.js b/src/main/nodejs/paisa-nonslim/foo.js
index 3d4f3e8..43cf8aa 100644
--- a/src/main/nodejs/paisa-nonslim/foo.js
+++ b/src/main/nodejs/paisa-nonslim/foo.js
@@ -519,9 +519,18 @@ Related:
);
child.on("error", console.error.bind(console));
child.stderr.on("data", logAsString);
- child.on("close", function(){
- nextJettyService();
- });
+ child.on("close", removeEmptyArray);
+ }
+ /* Pipeline is too dump for an empty array */
+ function removeEmptyArray( ex ){
+ if( ex ) throw ex;
+ var child = child_process.spawn(
+ "sed", [ "-i", "-E", "s_^(.*?).buildMaven\\(\\[\\]\\))(.*?)$_\\1\\2_", "Jenkinsfile" ],
+ { cwd: workdirOfSync(app, jettyService) },
+ );
+ child.on("error", console.error.bind(console));
+ child.stderr.on("data", logAsString);
+ child.on("close", nextJettyService);
}
function onNoMoreJettyServices(){
onDone(null, null);