From 74efda65cda3593be5d2f99b4a695d2bfa95db87 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 27 Jun 2017 00:40:16 +0100 Subject: [PATCH] windows: Two simple errors using Add-Warning (#25955) --- lib/ansible/modules/windows/win_lineinfile.ps1 | 2 +- lib/ansible/modules/windows/win_regedit.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/windows/win_lineinfile.ps1 b/lib/ansible/modules/windows/win_lineinfile.ps1 index a155acc4e6..134bee385a 100644 --- a/lib/ansible/modules/windows/win_lineinfile.ps1 +++ b/lib/ansible/modules/windows/win_lineinfile.ps1 @@ -421,7 +421,7 @@ If ($state -eq "present") { } If ($insertbefore -and $insertafter) { - Add-Warning('Both insertbefore and insertafter parameters found, ignoring "insertafter=$insertafter"'); + Add-Warning $result "Both insertbefore and insertafter parameters found, ignoring `"insertafter=$insertafter`"" } If (-not $insertbefore -and -not $insertafter) { diff --git a/lib/ansible/modules/windows/win_regedit.ps1 b/lib/ansible/modules/windows/win_regedit.ps1 index 6659aa474f..e558ad0e3a 100644 --- a/lib/ansible/modules/windows/win_regedit.ps1 +++ b/lib/ansible/modules/windows/win_regedit.ps1 @@ -45,7 +45,7 @@ if ($diff_support) { # Fix HCCC:\ PSDrive for pre-2.3 compatibility if ($path -match "^HCCC:\\") { - Add-Warning("Please use path: HKCC:\... instead of path: $path") + Add-Warning $result "Please use path: HKCC:\... instead of path: $path" $path = $path -replace "HCCC:\\","HKCC:\\" }