rename legacy PS module_utils to remove PowerShell prefix (#27495)

This commit is contained in:
Matt Davis 2017-07-31 10:06:12 -07:00 committed by GitHub
parent b79744f282
commit 91f4c37ed7
5 changed files with 4 additions and 4 deletions

View file

@ -791,7 +791,7 @@ def _find_module_utils(module_name, b_module_data, module_path, module_args, tas
for line in lines: for line in lines:
# legacy, equivalent to #Requires -Modules powershell # legacy, equivalent to #Requires -Modules powershell
if REPLACER_WINDOWS in line: if REPLACER_WINDOWS in line:
module_names.add(b'Ansible.ModuleUtils.PowerShellLegacy') module_names.add(b'Ansible.ModuleUtils.Legacy')
line_match = requires_module_list.match(line) line_match = requires_module_list.match(line)
if line_match: if line_match:
module_names.add(line_match.group(1)) module_names.add(line_match.group(1))

View file

@ -1,6 +1,6 @@
#!powershell #!powershell
#Requires -Module Ansible.ModuleUtils.PowerShellLegacy #Requires -Module Ansible.ModuleUtils.Legacy
#Requires -Module Ansible.ModuleUtils.CamelConversion #Requires -Module Ansible.ModuleUtils.CamelConversion
$ErrorActionPreference = 'Continue' $ErrorActionPreference = 'Continue'

View file

@ -1,5 +1,5 @@
#!powershell #!powershell
#Requires -Module Ansible.ModuleUtils.PowerShellLegacy #Requires -Module Ansible.ModuleUtils.Legacy
Exit-Json @{ data="success" } Exit-Json @{ data="success" }

View file

@ -1,7 +1,7 @@
#!powershell #!powershell
# use different cases, spacing and plural of 'module' to exercise flexible powershell dialect # use different cases, spacing and plural of 'module' to exercise flexible powershell dialect
#ReQuiReS -ModUleS Ansible.ModuleUtils.PowerShellLegacy #ReQuiReS -ModUleS Ansible.ModuleUtils.Legacy
#Requires -Module Ansible.ModuleUtils.ValidTestModule #Requires -Module Ansible.ModuleUtils.ValidTestModule
$o = CustomFunction $o = CustomFunction