kubectl
kubectl copied to clipboard
fix: ensure a newline is inserted before delimiter
This PR addresses two issues with the existing output redirect functionality:
-
In the current implementation, if the kubectl output (
kubectl $*) does not end with a newline, the action fails. This is because the delimiter (EOF) is inserted on the same line as the output. This PR ensures that a newline is always added before the end delimiter to prevent this issue. -
The current multiline delimiter is a literal
EOF, which does not adhere to the recommendations in the official documentation. This PR replaces the literalEOFwith a randomly generated delimiter, following the example provided in the official documentation.