-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
Would it be possible to add an option like "trimOutput" to apply trim() to returnStdout without having to wrap the `sh` / `bat` steps in `script{}`?
Edit:
To clarify what I mean
currently
script {
date = sh(
script: "date +%Y%m%d",
returnStdout: true).trim()
}
proposed:
date = sh script: "date +%Y%m%d",
returnStdout: true,
trimOutput: true
It's a simple thing and I assume quite common, but it would make pipelines more readable and it would be easier to figure out for people new to Jenkins if the option was right there in the docs, instead of having to hunt for it on StackOverflow.