Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_unzip: Fix for working creates: when using environment #20352

Merged
merged 1 commit into from
Jan 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/ansible/modules/windows/win_unzip.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ $result = New-Object psobject @{

$creates = Get-AnsibleParam -obj $params -name "creates" -type "path"
If ($creates -ne $null) {
If (Test-Path $params.creates) {
Exit-Json $result "The 'creates' file or directory already exists."
If (Test-Path $creates) {
$result.msg = "The 'creates' file or directory ($creates) already exists."
Exit-Json $result
}
}

Expand Down Expand Up @@ -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 "recurse" $recurse.toString()

Exit-Json $result;
Exit-Json $result