See the attached sample Train script for a repro (macOS 15.5, using Python 3.11.4.)
shell-exec-empty-capture.train.zip
Using shell.exec() with capture true, I do not see any captured output. For example:
try {
var result = shell.exec("/usr/bin/python3", "--version", {
timeout: 10,
capture: true,
workdir: "."
});
log("Result: '" + result + "'");
log("Length: " + result.length);
log("Expected: Should contain Python version string");
} catch (e) {
log("Error: " + e);
}
Expected
I see Result with the Python version (eg 3.11.4) and a non-zero length.
Observed
I get:
Result: ''
Length: 0
Please test with the attached script, it has two examples.