-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Revert back to having a default shell #68448
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
base: 3006.x
Are you sure you want to change the base?
Conversation
|
Is this a fix to #68298 ? If yes, thanks, as this regression has broken some code of mine. |
140dcca to
7c54899
Compare
efd8eac to
0d74b92
Compare
0d74b92 to
93a2044
Compare
| if ( | ||
| python_shell is not True | ||
| and shell is not None | ||
| and not salt.utils.platform.is_windows() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You updated utils.shlex_split to work with windows, so I think this and not salt.utils.platform.is_windows() should be removed.
| if "python_shell" in kwargs: | ||
| python_shell = kwargs.pop("python_shell") | ||
| else: | ||
| python_shell = False | ||
| python_shell = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just python_shell = kwargs.pop("python_shell", True)
| """ | ||
| if isinstance(s, str): | ||
| return shlex.split(s, **kwargs) | ||
| if sys.platform == "win32": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use salt.utils.platform.is_windows() instead?
What does this PR do?
Reverts part of #68156 that changed the default behavior for
python_shellandshell. Also fixes a bug in the PR mentioned above, where you couldn't pass non-list parameters to a script.What issues does this PR fix or reference?
Fixes #68156
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes