Fork me on GitHub

Hello! I’m experimenting with some babashka scripting and am having trouble diagnosing a problem. I’m attempting to pull an Openshift ConfigMap via their CLI tool and output it as JSON Everything works as expected when running this with “smaller” (say 1 - 10 KB) configMaps

(-> @(process "oc get configmap smaller-config-map -o json") :out slurp println)
But it just hangs with “larger” configMaps (131 KB is what I’ve seen fail so far but I’m trying to narrow the gap and figure out the threshold) When run from a terminal the oc get ... command behaves the same way regardless of which configMap is specified Are there any suggestions on how I could diagnose this or proceed?


@jackmoch Can you try (-> (shell {:out :string} "oc get configmap smaller-config-map -o json" ):out println) instead? Of since you just want to see the output:

(shell "oc get configmap smaller-config-map -o json")
should do it


if you remove the @ it should also work. The problem is that you're waiting for the process to end before you consume the stream, but when the buffer is full, the process can't continue


Ah yes that’s exactly what I’m looking for! It sounds like I need to spend some more time with the process and shell docs…👀 Thank you @borkdude!


I think the README should probably emphasize shell more which is what people typically will use, probably