mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
standardise the powershell FileUtils (#34969)
This commit is contained in:
parent
944ae47701
commit
6f9f337a67
8 changed files with 86 additions and 73 deletions
|
@ -119,7 +119,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
$complete = $false
|
||||
while (((Get-Date) - $start_time).TotalSeconds -lt $timeout) {
|
||||
$attempts += 1
|
||||
if (Test-FilePath -path $path) {
|
||||
if (Test-AnsiblePath -Path $path) {
|
||||
if ($search_regex -eq $null) {
|
||||
$complete = $true
|
||||
break
|
||||
|
@ -150,7 +150,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
$complete = $false
|
||||
while (((Get-Date) - $start_time).TotalSeconds -lt $timeout) {
|
||||
$attempts += 1
|
||||
if (Test-FilePath -path $path) {
|
||||
if (Test-AnsiblePath -Path $path) {
|
||||
if ($search_regex -ne $null) {
|
||||
$file_contents = Get-Content -Path $path -Raw
|
||||
if ($file_contents -notmatch $search_regex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue