salt
salt copied to clipboard
[3006.x] Fix stdin raw newlines for timed subprocess
What does this PR do?
What issues does this PR fix or reference?
Fixes issue #62501
Previous Behavior
The following error was thrown when running cmd.run with a str passed via stdin and stdin_raw_newlines=True
Passed invalid arguments to cmd.run: memoryview: a bytes-like object is required, not 'str'
New Behavior
String also gets converted to bytes when stdin_raw_newlines=True, so no error is thrown
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
- [x] Docs
- [x] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
- [x] Tests written/updated
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices, including the PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.