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

Allows use of inline powershell for cmd.script args #56197

Merged
merged 2 commits into from
Mar 10, 2020

Conversation

lorengordon
Copy link
Contributor

@lorengordon lorengordon commented Feb 18, 2020

What does this PR do?

Using powershell.exe with -File when the source shell is cmd treats all args as literal strings, which prevents usage of inline powershell. This patch just removes the -File argument, which still works with a script, but allows powershell to process any inline powershell that may be passed to one of the script args.

What issues does this PR fix or reference?

Fixes #56195

Previous Behavior

Args passed to cmd.script with shell=powershell were treated as literal strings

New Behavior

Args are processed by powershell

Tests written?

[NOTICE] Bug fixes or features added to Salt require tests.
Please review the test documentation for details on how to implement tests into Salt's test suite.

Yes

Commits signed with GPG?

Yes

@lorengordon lorengordon force-pushed the file-or-no-file branch 4 times, most recently from 9b6d31c to c660a6d Compare February 20, 2020 03:28
@twangboy twangboy added v3000.1 vulnerable version Merge Ready labels Mar 9, 2020
@dwoz dwoz merged commit 3e57d58 into saltstack:master Mar 10, 2020
@lorengordon lorengordon deleted the file-or-no-file branch March 11, 2020 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3000.1 vulnerable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: Using inline powershell in args with cmd.script and shell: powershell
3 participants