Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3006.x] Fix issues with the cmd module on Windows #66447

Merged
merged 3 commits into from
May 14, 2024

Conversation

twangboy
Copy link
Contributor

@twangboy twangboy commented Apr 26, 2024

What does this PR do?

Fixes various issues with the cmd module on Windows:

  • Piping stderr to stdout is not optional for cmd.run
  • Scripts are called using the -Command & parameter for powershell.exe
  • stderr is cleared if it contains CLIXML (only for encoded commands)
  • cmd.powershell now accepts commands as lists
  • Makes sure returned JSON data is valid before trying to load it
  • Strips whitespace from the stdout in win_runas

What issues does this PR fix or reference?

Fixes #61166

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@twangboy twangboy requested a review from a team as a code owner April 26, 2024 18:10
@twangboy twangboy requested review from felippeb and removed request for a team April 26, 2024 18:10
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Fix issues with the cmd module on Windows [3006.x] Fix issues with the cmd module on Windows Apr 26, 2024
@s0undt3ch s0undt3ch merged commit 580ad43 into saltstack:3006.x May 14, 2024
278 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants