mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 03:30:22 -07:00
win_unzip: Fix for working 'creates' (#20352)
Also fix an incorrect Exit-Json call.
This commit is contained in:
parent
e9704b389b
commit
74ecbebf7a
1 changed files with 4 additions and 3 deletions
|
@ -29,8 +29,9 @@ $result = New-Object psobject @{
|
||||||
|
|
||||||
$creates = Get-AnsibleParam -obj $params -name "creates" -type "path"
|
$creates = Get-AnsibleParam -obj $params -name "creates" -type "path"
|
||||||
If ($creates -ne $null) {
|
If ($creates -ne $null) {
|
||||||
If (Test-Path $params.creates) {
|
If (Test-Path $creates) {
|
||||||
Exit-Json $result "The 'creates' file or directory already exists."
|
$result.msg = "The 'creates' file or directory ($creates) already exists."
|
||||||
|
Exit-Json $result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,4 +140,4 @@ Set-Attr $result.win_unzip "src" $src.toString()
|
||||||
Set-Attr $result.win_unzip "dest" $dest.toString()
|
Set-Attr $result.win_unzip "dest" $dest.toString()
|
||||||
Set-Attr $result.win_unzip "recurse" $recurse.toString()
|
Set-Attr $result.win_unzip "recurse" $recurse.toString()
|
||||||
|
|
||||||
Exit-Json $result;
|
Exit-Json $result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue