Skip to content

Commit

Permalink
Small fix in the error output (ansible#26004)
Browse files Browse the repository at this point in the history
So I noticed this when doing integration tests:

    Failed to copy file Could not find a part of the path

and this change turns it into:

    Failed to copy file: Could not find a part of the path

I also moved something out of the exception handling.
  • Loading branch information
dagwieers authored and resmo committed Jun 24, 2017
1 parent 21c7fcf commit 014bcad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ansible/modules/windows/win_copy.ps1
Original file line number Diff line number Diff line change
@@ -78,10 +78,10 @@ Function Copy-File($src, $dest) {
if ($src_checksum -ne $dest_checksum) {
try {
Copy-Item -Path $src -Destination $dest -Force -WhatIf:$check_mode
$result.changed = $true
} catch {
Fail-Json $result "Failed to copy file $($_.Exception.Message)"
Fail-Json $result "Failed to copy file: $($_.Exception.Message)"
}
$result.changed = $true
}

# Verify the file we copied is the same

0 comments on commit 014bcad

Please sign in to comment.