command warnings: don't send the param from action (#70531)

Change:
- Followup to #70504. We need to not pass the 'warn' parameter from the
  action plugin either, unless it's True. Otherwise, even though it
  defaults to false, we always show the deprecation.

Test Plan:
- Local

Signed-off-by: Rick Elrod <rick@elrod.me>
pull/70576/head
Rick Elrod 4 years ago committed by GitHub
parent f7db428375
commit 28fda23284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Fix to previous deprecation change (#70504) which caused command warning deprecation to show in all cases, even when not specified by the user.

@ -17,7 +17,7 @@ class ActionModule(ActionBase):
del tmp # tmp no longer has any effect
# Command module has a special config option to turn off the command nanny warnings
if 'warn' not in self._task.args:
if 'warn' not in self._task.args and C.COMMAND_WARNINGS:
self._task.args['warn'] = C.COMMAND_WARNINGS
wrap_async = self._task.async_val and not self._connection.has_native_async

Loading…
Cancel
Save